Class ByteSourceArray
- java.lang.Object
-
- org.apache.commons.imaging.common.bytesource.ByteSource
-
- org.apache.commons.imaging.common.bytesource.ByteSourceArray
-
public class ByteSourceArray extends ByteSource
-
-
Constructor Summary
Constructors Constructor Description ByteSourceArray(byte[] bytes)ByteSourceArray(String fileName, byte[] bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getAll()byte[]getBlock(long startLong, int length)StringgetDescription()InputStreamgetInputStream()longgetLength()This operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length.-
Methods inherited from class org.apache.commons.imaging.common.bytesource.ByteSource
getBlock, getFileName, getInputStream
-
-
-
-
Constructor Detail
-
ByteSourceArray
public ByteSourceArray(String fileName, byte[] bytes)
-
ByteSourceArray
public ByteSourceArray(byte[] bytes)
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStreamin classByteSource
-
getBlock
public byte[] getBlock(long startLong, int length) throws IOException- Specified by:
getBlockin classByteSource- Throws:
IOException
-
getLength
public long 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
-
getAll
public byte[] getAll() throws IOException- Specified by:
getAllin classByteSource- Throws:
IOException
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin classByteSource
-
-