Class ByteSourceInputStream


  • public class ByteSourceInputStream
    extends ByteSource
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteSourceInputStream​(java.io.InputStream is, java.lang.String fileName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getAll()  
      byte[] getBlock​(long blockStart, int blockLength)  
      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

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

      • ByteSourceInputStream

        public ByteSourceInputStream​(java.io.InputStream is,
                                     java.lang.String fileName)
    • 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 blockStart,
                               int blockLength)
                        throws java.io.IOException
        Specified by:
        getBlock in class ByteSource
        Throws:
        java.io.IOException
      • getLength

        public long getLength()
                       throws java.io.IOException
        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
        Throws:
        java.io.IOException - if it fails to read the byte source data
      • getAll

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