public final class SingleByteArrayVol extends Volume
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
data |
protected static VolumeFactory |
FACTORY |
closed, LOG, UNSAFE_VOL_FACTORY| Constructor and Description |
|---|
SingleByteArrayVol(byte[] data) |
SingleByteArrayVol(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(long startOffset,
long endOffset)
Set all bytes between
startOffset and endOffset to zero. |
void |
close() |
void |
copyTo(long inputOffset,
Volume target,
long targetOffset,
long size)
Transfers data from this Volume into target volume.
|
void |
ensureAvailable(long offset)
Check space allocated by Volume is bigger or equal to given offset.
|
byte |
getByte(long offset) |
void |
getData(long offset,
byte[] bytes,
int bytesPos,
int length) |
DataInput2 |
getDataInput(long offset,
int size) |
java.io.File |
getFile()
returns underlying file if it exists
|
boolean |
getFileLocked()
return true if this Volume holds exclusive lock over its file
|
int |
getInt(long offset) |
long |
getLong(long offset) |
boolean |
isReadOnly() |
boolean |
isSliced() |
long |
length() |
void |
putByte(long offset,
byte value) |
void |
putData(long offset,
byte[] src,
int srcPos,
int srcSize) |
void |
putData(long offset,
java.nio.ByteBuffer buf) |
void |
putInt(long offset,
int value) |
void |
putLong(long offset,
long v) |
int |
sliceSize() |
void |
sync() |
void |
truncate(long size) |
assertZeroes, clearOverlap, copyFrom, copyTo, copyTo, deleteFile, fileLoad, finalize, getDataInputOverlap, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, hash, isClosed, putDataOverlap, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShortprotected static final VolumeFactory FACTORY
protected final byte[] data
public SingleByteArrayVol(int size)
public SingleByteArrayVol(byte[] data)
public void ensureAvailable(long offset)
VolumeensureAvailable in class Volumepublic void putData(long offset,
byte[] src,
int srcPos,
int srcSize)
public void putData(long offset,
java.nio.ByteBuffer buf)
public void copyTo(long inputOffset,
Volume target,
long targetOffset,
long size)
Volumepublic void clear(long startOffset,
long endOffset)
VolumestartOffset and endOffset to zero.
Area between offsets must be ready for write once clear finishes.public DataInput2 getDataInput(long offset, int size)
getDataInput in class Volumepublic void getData(long offset,
byte[] bytes,
int bytesPos,
int length)
public void close()
public int sliceSize()
public boolean isReadOnly()
isReadOnly in class Volumepublic java.io.File getFile()
Volumepublic boolean getFileLocked()
VolumegetFileLocked in class VolumeCopyright © 2018. All Rights Reserved.