public abstract class ByteBufferWrapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
myDirty |
protected java.nio.file.Path |
myFile |
protected long |
myLength |
protected long |
myPosition |
Modifier | Constructor and Description |
---|---|
protected |
ByteBufferWrapper(java.nio.file.Path file,
long offset,
long length) |
Modifier and Type | Method and Description |
---|---|
int |
allocationSize() |
void |
dispose() |
abstract void |
flush() |
abstract java.nio.ByteBuffer |
getBuffer() |
abstract java.nio.ByteBuffer |
getCachedBuffer() |
boolean |
isDirty() |
void |
markDirty() |
static ByteBufferWrapper |
readOnly(java.nio.file.Path file,
int offset) |
static ByteBufferWrapper |
readWriteDirect(java.nio.file.Path file,
long offset,
int length) |
java.lang.String |
toString() |
abstract void |
unmap() |
protected final java.nio.file.Path myFile
protected final long myPosition
protected final long myLength
protected volatile boolean myDirty
protected ByteBufferWrapper(java.nio.file.Path file, long offset, long length)
public abstract java.nio.ByteBuffer getCachedBuffer()
public final void markDirty()
public final boolean isDirty()
public abstract java.nio.ByteBuffer getBuffer() throws java.io.IOException
java.io.IOException
public abstract void unmap()
public abstract void flush()
public void dispose()
public static ByteBufferWrapper readWriteDirect(java.nio.file.Path file, long offset, int length)
public static ByteBufferWrapper readOnly(java.nio.file.Path file, int offset) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public int allocationSize()