Class InMemoryInputFile

  • All Implemented Interfaces:
    InputFile

    public class InMemoryInputFile
    extends java.lang.Object
    implements InputFile
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists()
      Checks whether the file exists.
      long getLength()
      Returns the total length of the file, in bytes
      java.lang.String location()
      The fully-qualified location of the input file as a String.
      SeekableInputStream newStream()
      Opens a new SeekableInputStream for the underlying data file
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InMemoryInputFile

        public InMemoryInputFile​(byte[] contents)
      • InMemoryInputFile

        public InMemoryInputFile​(java.lang.String location,
                                 byte[] contents)
    • Method Detail

      • 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
      • location

        public java.lang.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