|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.text.io.IndependentRandomAccessSource
public class IndependentRandomAccessSource
A RandomAccessSource that is wraps another RandomAccessSouce but does not propagate close(). This is useful when passing a RandomAccessSource to a method that would normally close the source.
| Constructor Summary | |
|---|---|
IndependentRandomAccessSource(RandomAccessSource source)
Constructs a new OffsetRandomAccessSource |
|
| Method Summary | |
|---|---|
void |
close()
Does nothing - the underlying source is not closed |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IndependentRandomAccessSource(RandomAccessSource source)
source - the source| Method Detail |
|---|
public int get(long position)
throws IOException
get in interface RandomAccessSourceIOException
public int get(long position,
byte[] bytes,
int off,
int len)
throws IOException
get in interface RandomAccessSourceposition - 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
IOExceptionpublic long length()
length in interface RandomAccessSource
public void close()
throws IOException
close in interface RandomAccessSourceIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||