public class IndependentRandomAccessSource extends Object implements RandomAccessSource
Constructor and Description |
---|
IndependentRandomAccessSource(RandomAccessSource source)
Constructs a new OffsetRandomAccessSource
|
Modifier and Type | Method and Description |
---|---|
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() |
public IndependentRandomAccessSource(RandomAccessSource source)
source
- the source
public int get(long position) throws IOException
get
in interface RandomAccessSource
IOException
public int get(long position, byte[] bytes, int off, int len) throws IOException
get
in interface RandomAccessSource
position
- 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
IOException
public long length()
length
in interface RandomAccessSource
public void close() throws IOException
close
in interface RandomAccessSource
IOException
Copyright © 1998–2022. All rights reserved.