Class ByteSource
java.lang.Object
org.apache.commons.imaging.bytesource.ByteSource
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteSource
array
(byte[] array) static ByteSource
static ByteSource
byte[]
getByteArray
(long position, int length) final String
static final InputStream
getInputStream
(ByteSource byteSource, long skip) static ByteSource
inputStream
(InputStream is, String name) static ByteSource
long
size()
This operation can be VERY expensive; for InputStream byte sources, the entire stream must be drained to determine its length.toString()
-
Method Details
-
array
-
array
-
file
-
getInputStream
- Throws:
IOException
-
inputStream
- Throws:
IOException
-
path
-
getByteArray
- Throws:
IOException
-
getFileName
-
getInputStream
- Throws:
IOException
-
size
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
-
toString
-