Class InMemoryFileIO

java.lang.Object
org.apache.iceberg.inmemory.InMemoryFileIO
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, FileIO

public class InMemoryFileIO extends Object implements FileIO
See Also:
  • Constructor Details

    • InMemoryFileIO

      public InMemoryFileIO()
  • Method Details

    • addFile

      public void addFile(String location, byte[] contents)
    • fileExists

      public boolean fileExists(String location)
    • newInputFile

      public InputFile newInputFile(String location)
      Description copied from interface: FileIO
      Get a InputFile instance to read bytes from the file at the given path.
      Specified by:
      newInputFile in interface FileIO
    • newOutputFile

      public OutputFile newOutputFile(String location)
      Description copied from interface: FileIO
      Get a OutputFile instance to write bytes to the file at the given path.
      Specified by:
      newOutputFile in interface FileIO
    • deleteFile

      public void deleteFile(String location)
      Description copied from interface: FileIO
      Delete the file at the given path.
      Specified by:
      deleteFile in interface FileIO
    • isClosed

      public boolean isClosed()
    • close

      public void close()
      Description copied from interface: FileIO
      Close File IO to release underlying resources.

      Calling this method is only required when this FileIO instance is no longer expected to be used, and the resources it holds need to be explicitly released to avoid resource leaks.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface FileIO