Class ByteSourceFile

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File file  
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteSourceFile​(java.io.File file)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getAll()  
      byte[] getBlock​(long start, int length)  
      java.lang.String getDescription()  
      java.io.InputStream getInputStream()  
      long getLength()
      This operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.
      • Methods inherited from class java.lang.Object

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

      • file

        private final java.io.File file
    • Constructor Detail

      • ByteSourceFile

        public ByteSourceFile​(java.io.File file)
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in class ByteSource
        Throws:
        java.io.IOException
      • getBlock

        public byte[] getBlock​(long start,
                               int length)
                        throws java.io.IOException
        Specified by:
        getBlock in class ByteSource
        Throws:
        java.io.IOException
      • getLength

        public long getLength()
        Description copied from class: ByteSource
        This operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.
        Specified by:
        getLength in class ByteSource
        Returns:
        the byte source length
      • getAll

        public byte[] getAll()
                      throws java.io.IOException
        Specified by:
        getAll in class ByteSource
        Throws:
        java.io.IOException