Class InMemoryInputFile

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

public class InMemoryInputFile extends Object implements InputFile
  • Constructor Details Link icon

    • InMemoryInputFile Link icon

      public InMemoryInputFile(byte[] contents)
    • InMemoryInputFile Link icon

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

    • getLength Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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