java.lang.Object
org.openpdf.text.utils.LongMappedByteBuffer
A utility class that allows random access to files larger than 2GB by internally
mapping them into multiple
MappedByteBuffer chunks of up to 2GB each.- Since:
- 2.0.4
-
Constructor Summary
ConstructorsConstructorDescriptionLongMappedByteBuffer(FileChannel channel, FileChannel.MapMode mode) Constructs a new LongMappedByteBuffer by chunk-mapping the file channel. -
Method Summary
Modifier and TypeMethodDescriptionvoidforce()byteget()voidget(byte[] dst, int off, int len) byteget(long pos) voidget(long pos, byte[] dst, int off, int len) booleanisLoaded()longlimit()load()longposition()position(long newPosition) voidput(byte value) voidput(byte[] src, int off, int len) voidput(long pos, byte value) intread(byte[] bytes, int off, int len) longsize()
-
Constructor Details
-
LongMappedByteBuffer
Constructs a new LongMappedByteBuffer by chunk-mapping the file channel.- Throws:
IOException
-
-
Method Details
-
get
public byte get() -
get
public byte get(long pos) -
get
public void get(long pos, byte[] dst, int off, int len) -
get
public void get(byte[] dst, int off, int len) -
put
public void put(byte value) -
put
public void put(long pos, byte value) -
put
public void put(byte[] src, int off, int len) -
read
public int read(byte[] bytes, int off, int len) -
position
public long position() -
position
-
size
public long size() -
limit
public long limit() -
load
-
isLoaded
public boolean isLoaded() -
force
public void force()
-