Class ByteSourceInputStream
java.lang.Object
org.apache.commons.imaging.common.bytesource.ByteSource
org.apache.commons.imaging.common.bytesource.ByteSourceInputStream
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate ByteSourceInputStream.CacheBlockprivate final InputStreamprivate byte[]private long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getAll()byte[]getBlock(long blockStart, int blockLength) private ByteSourceInputStream.CacheBlocklongThis operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.private ByteSourceInputStream.CacheBlockMethods inherited from class org.apache.commons.imaging.common.bytesource.ByteSource
getBlock, getFileName, getInputStream
-
Field Details
-
BLOCK_SIZE
private static final int BLOCK_SIZE- See Also:
-
is
-
cacheHead
-
readBuffer
private byte[] readBuffer -
streamLength
private long streamLength
-
-
Constructor Details
-
ByteSourceInputStream
-
-
Method Details
-
readBlock
- Throws:
IOException
-
getFirstBlock
- Throws:
IOException
-
getInputStream
- Specified by:
getInputStreamin classByteSource- Throws:
IOException
-
getBlock
- Specified by:
getBlockin classByteSource- Throws:
IOException
-
getLength
Description copied from class:ByteSourceThis operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.- Specified by:
getLengthin classByteSource- Returns:
- the byte source length
- Throws:
IOException- if it fails to read the byte source data
-
getAll
- Specified by:
getAllin classByteSource- Throws:
IOException
-
getDescription
- Specified by:
getDescriptionin classByteSource
-