public class ByteBufferVol
extends Volume
Abstract Volume over bunch of ByteBuffers It leaves ByteBufferVol details (allocation, disposal) on subclasses. Most methods are final for better performance (JIT compiler can inline those).
Modifier and Type | Field and Description |
---|---|
boolean |
cleanerHackEnabled |
java.util.concurrent.locks.ReentrantLock |
growLock |
boolean |
readOnly |
int |
sliceShift |
int |
sliceSize |
int |
sliceSizeModMask |
java.nio.ByteBuffer[] |
slices |
LOG, UNSAFE_VOL_FACTORY, closed
Constructor and Description |
---|
ByteBufferVol() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
copyTo() |
byte |
getByte() |
void |
getData() |
DataInput2.ByteBuffer |
getDataInput() |
DataInput2 |
getDataInputOverlap() |
int |
getInt() |
long |
getLong() |
long |
getPackedLong() |
long |
getSixLong() |
java.nio.ByteBuffer |
getSlice() |
int |
getUnsignedByte() |
int |
getUnsignedShort() |
boolean |
isSliced() |
void |
putByte() |
void |
putData() |
void |
putData() |
void |
putDataOverlap() |
void |
putInt() |
void |
putLong() |
int |
putPackedLong() |
void |
putSixLong() |
void |
putUnsignedByte() |
void |
putUnsignedShort() |
int |
sliceSize() |
static byte |
toByte() |
static byte |
toByte() |
static boolean |
unmap()
Hack to unmap MappedByteBuffer. Unmap is necessary on Windows, otherwise file is locked until JVM exits or BB is GCed. There is no public JVM API to unmap buffer, so this tries to use SUN proprietary API for unmap. Any error is silently ignored (for example SUN API does not exist on Android).
|
assertZeroes, clear, clearOverlap, close, copyFrom, copyTo, copyTo, copyTo, deleteFile, ensureAvailable, fileLoad, finalize, getByte, getData, getDataInput, getDataInputOverlap, getFile, getFileLocked, getInt, getLong, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, hash, isClosed, isReadOnly, isSliced, length, putByte, putData, putData, putDataOverlap, putInt, putLong, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, sliceSize, sync, truncate
public boolean cleanerHackEnabled
public java.util.concurrent.locks.ReentrantLock growLock
public int sliceShift
public int sliceSizeModMask
public int sliceSize
public java.nio.ByteBuffer[] slices
public boolean readOnly
public java.nio.ByteBuffer getSlice()
public void putLong()
public void putInt()
public void putByte()
public void putData()
public void putData()
public void copyTo()
public void getData()
public long getLong()
public int getInt()
public byte getByte()
public DataInput2.ByteBuffer getDataInput()
public void putDataOverlap()
public DataInput2 getDataInputOverlap()
public void putUnsignedShort()
public int getUnsignedShort()
public int getUnsignedByte()
public void putUnsignedByte()
public static byte toByte()
public static byte toByte()
public long getSixLong()
public void putSixLong()
public int putPackedLong()
public long getPackedLong()
public void clear()
public boolean isSliced()
public int sliceSize()
public static boolean unmap()
Hack to unmap MappedByteBuffer. Unmap is necessary on Windows, otherwise file is locked until JVM exits or BB is GCed. There is no public JVM API to unmap buffer, so this tries to use SUN proprietary API for unmap. Any error is silently ignored (for example SUN API does not exist on Android).