Class ByteSource
java.lang.Object
org.apache.commons.imaging.common.bytesource.ByteSource
- Direct Known Subclasses:
ByteSourceArray
,ByteSourceFile
,ByteSourceInputStream
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]
getAll()
byte[]
getBlock
(int start, int length) abstract byte[]
getBlock
(long start, int length) abstract String
final String
abstract InputStream
final InputStream
getInputStream
(long start) abstract long
This operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.
-
Field Details
-
fileName
-
-
Constructor Details
-
ByteSource
-
-
Method Details
-
getInputStream
- Throws:
IOException
-
getInputStream
- Throws:
IOException
-
getBlock
- Throws:
IOException
-
getBlock
- Throws:
IOException
-
getAll
- Throws:
IOException
-
getLength
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:
IOException
- if it fails to read the byte source data
-
getDescription
-
getFileName
-