Class ByteSource

    • Constructor Summary

      Constructors 
      Constructor Description
      ByteSource​(java.lang.String fileName)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract byte[] getAll()  
      byte[] getBlock​(int start, int length)  
      abstract byte[] getBlock​(long start, int length)  
      abstract java.lang.String getDescription()  
      java.lang.String getFileName()  
      abstract java.io.InputStream getInputStream()  
      java.io.InputStream getInputStream​(long start)  
      abstract 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

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

      • ByteSource

        public ByteSource​(java.lang.String fileName)
    • Method Detail

      • getInputStream

        public final java.io.InputStream getInputStream​(long start)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getInputStream

        public abstract java.io.InputStream getInputStream()
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getBlock

        public byte[] getBlock​(int start,
                               int length)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getBlock

        public abstract byte[] getBlock​(long start,
                                        int length)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getAll

        public abstract byte[] getAll()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • getLength

        public abstract long getLength()
                                throws java.io.IOException
        This operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.
        Returns:
        the byte source length
        Throws:
        java.io.IOException - if it fails to read the byte source data
      • getDescription

        public abstract java.lang.String getDescription()
      • getFileName

        public final java.lang.String getFileName()