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)
IRandomAccessSource
get
in interface IRandomAccessSource
offset
- byte position
public int get(long offset, byte[] bytes, int off, int len)
IRandomAccessSource
get
in interface IRandomAccessSource
offset
- the position in the RandomAccessSource to read from
bytes
- output buffer
off
- offset into the output buffer where results will be placed
len
- the number of bytes to read
public long length()
IRandomAccessSource
length
in interface IRandomAccessSource
public void close() throws IOException
IRandomAccessSource
close
in interface IRandomAccessSource
IOException
Copyright © 1998–2018 iText Group NV. All rights reserved.