Class InMemoryInputFile

java.lang.Object
org.apache.iceberg.inmemory.InMemoryInputFile
All Implemented Interfaces:
InputFile

public class InMemoryInputFile extends Object implements InputFile
  • Constructor Details

    • InMemoryInputFile

      public InMemoryInputFile(byte[] contents)
    • InMemoryInputFile

      public InMemoryInputFile(String location, byte[] contents)
  • Method Details

    • getLength

      public long getLength()
      Description copied from interface: InputFile
      Returns the total length of the file, in bytes
      Specified by:
      getLength in interface InputFile
      Returns:
      the total length of the file, in bytes
    • newStream

      public SeekableInputStream newStream()
      Description copied from interface: InputFile
      Opens a new SeekableInputStream for the underlying data file
      Specified by:
      newStream in interface InputFile
      Returns:
      a seekable stream for reading the file
    • location

      public String location()
      Description copied from interface: InputFile
      The fully-qualified location of the input file as a String.
      Specified by:
      location in interface InputFile
      Returns:
      the input file location
    • exists

      public boolean exists()
      Description copied from interface: InputFile
      Checks whether the file exists.
      Specified by:
      exists in interface InputFile
      Returns:
      true if the file exists, false otherwise