|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RandomAccessSource
Represents an abstract source that bytes can be read from. This class forms the foundation for all byte input in iText. Implementations do not keep track of a current 'position', but rather provide absolute get methods. Tracking position should be handled in classes that use RandomAccessSource internally (via composition).
Method Summary | |
---|---|
void |
close()
Closes this source. |
int |
get(long position)
Gets a byte at the specified position |
int |
get(long position,
byte[] bytes,
int off,
int len)
Gets an array at the specified position. |
long |
length()
|
Method Detail |
---|
int get(long position) throws IOException
position
-
IOException
int get(long position, byte[] bytes, int off, int len) throws IOException
position
- the position in the RandomAccessSource to read frombytes
- output bufferoff
- offset into the output buffer where results will be placedlen
- the number of bytes to read
IOException
long length()
void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |