protected static class PdfTokenizer.ReusableRandomAccessSource extends Object implements IRandomAccessSource
| Constructor and Description |
|---|
ReusableRandomAccessSource(ByteBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this source.
|
int |
get(long offset)
Gets a byte at the specified position
|
int |
get(long offset,
byte[] bytes,
int off,
int len)
Read an array of bytes of specified length from the specified position of source to the buffer applying the offset.
|
long |
length()
Gets the length of the source
|
public ReusableRandomAccessSource(ByteBuffer buffer)
public int get(long offset)
IRandomAccessSourceget in interface IRandomAccessSourceoffset - byte positionpublic int get(long offset,
byte[] bytes,
int off,
int len)
IRandomAccessSourceget in interface IRandomAccessSourceoffset - 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 readpublic long length()
IRandomAccessSourcelength in interface IRandomAccessSourcepublic void close()
throws IOException
IRandomAccessSourceclose in interface IRandomAccessSourceIOExceptionCopyright © 1998–2017 iText Group NV. All rights reserved.