Class ByteSourceArray
java.lang.Object
org.apache.commons.imaging.common.bytesource.ByteSource
org.apache.commons.imaging.common.bytesource.ByteSourceArray
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionByteSourceArray
(byte[] bytes) ByteSourceArray
(String fileName, byte[] bytes) -
Method Summary
Methods inherited from class org.apache.commons.imaging.common.bytesource.ByteSource
getBlock, getFileName, getInputStream
-
Field Details
-
bytes
private final byte[] bytes
-
-
Constructor Details
-
ByteSourceArray
-
ByteSourceArray
public ByteSourceArray(byte[] bytes)
-
-
Method Details
-
getInputStream
- Specified by:
getInputStream
in classByteSource
-
getBlock
- Specified by:
getBlock
in classByteSource
- Throws:
IOException
-
getLength
public long getLength()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 classByteSource
- Returns:
- the byte source length
-
getAll
- Specified by:
getAll
in classByteSource
- Throws:
IOException
-
getDescription
- Specified by:
getDescription
in classByteSource
-