public final class MemoryMappedFile extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MemoryMappedFile.ChannelTransfer |
Constructor and Description |
---|
MemoryMappedFile(File file,
int bufferSize,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
read(long position,
org.fusesource.hawtbuf.Buffer data) |
void |
read(long position,
byte[] data) |
void |
read(long position,
byte[] data,
int offset,
int length) |
ByteBuffer |
read(long position,
int length) |
MemoryMappedFile.ChannelTransfer |
readChannelTansfer(int position,
int length) |
ByteBuffer |
slice(boolean readOnly,
long position,
int length) |
void |
sync() |
void |
unslice(ByteBuffer buffer) |
void |
write(long position,
org.fusesource.hawtbuf.Buffer data) |
void |
write(long position,
byte[] data) |
void |
write(long position,
byte[] data,
int offset,
int length) |
void |
write(long position,
ByteBuffer data) |
void |
writeChannelTansfer(long position,
MemoryMappedFile.ChannelTransfer transfer) |
public MemoryMappedFile(File file, int bufferSize, boolean readOnly) throws IOException
IOException
public void read(long position, byte[] data) throws IOPagingException
IOPagingException
public void read(long position, org.fusesource.hawtbuf.Buffer data) throws IOPagingException
IOPagingException
public void read(long position, byte[] data, int offset, int length) throws IOPagingException
IOPagingException
public ByteBuffer read(long position, int length) throws IOPagingException
IOPagingException
public ByteBuffer slice(boolean readOnly, long position, int length)
public void unslice(ByteBuffer buffer)
public MemoryMappedFile.ChannelTransfer readChannelTansfer(int position, int length) throws IOPagingException
IOPagingException
public void writeChannelTansfer(long position, MemoryMappedFile.ChannelTransfer transfer) throws IOPagingException
IOPagingException
public void write(long position, byte[] data) throws IOPagingException
IOPagingException
public void write(long position, org.fusesource.hawtbuf.Buffer data) throws IOPagingException
IOPagingException
public void write(long position, ByteBuffer data) throws IOPagingException
IOPagingException
public void write(long position, byte[] data, int offset, int length) throws IOPagingException
IOPagingException
public void sync() throws IOPagingException
IOPagingException
public void close() throws IOPagingException
IOPagingException
Copyright © 2009–2016 FuseSource, Corp.. All rights reserved.