Class ByteSource
- java.lang.Object
 - 
- org.apache.commons.imaging.common.bytesource.ByteSource
 
 
- 
- Direct Known Subclasses:
 ByteSourceArray,ByteSourceFile,ByteSourceInputStream
public abstract class ByteSource extends java.lang.Object 
- 
- 
Constructor Summary
Constructors Constructor Description ByteSource(java.lang.String fileName) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract byte[]getAll()byte[]getBlock(int start, int length)abstract byte[]getBlock(long start, int length)abstract java.lang.StringgetDescription()java.lang.StringgetFileName()abstract java.io.InputStreamgetInputStream()java.io.InputStreamgetInputStream(long start)abstract longgetLength()This operation can be VERY expensive; for inputstream byte sources, the entire stream must be drained to determine its length. 
 - 
 
- 
- 
Method Detail
- 
getInputStream
public final java.io.InputStream getInputStream(long start) throws java.io.IOException- Throws:
 java.io.IOException
 
- 
getInputStream
public abstract java.io.InputStream getInputStream() throws java.io.IOException- Throws:
 java.io.IOException
 
- 
getBlock
public byte[] getBlock(int start, int length) throws java.io.IOException- Throws:
 java.io.IOException
 
- 
getBlock
public abstract byte[] getBlock(long start, int length) throws java.io.IOException- Throws:
 java.io.IOException
 
- 
getAll
public abstract byte[] getAll() throws java.io.IOException- Throws:
 java.io.IOException
 
- 
getLength
public abstract long getLength() throws java.io.IOExceptionThis 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:
 java.io.IOException- if it fails to read the byte source data
 
- 
getDescription
public abstract java.lang.String getDescription()
 
- 
getFileName
public final java.lang.String getFileName()
 
 - 
 
 -