public static final class Volume.SingleByteArrayVol extends Volume
Volume.ByteArrayVol, Volume.ByteBufferVol, Volume.ByteBufferVolSingle, Volume.FileChannelVol, Volume.MappedFileVol, Volume.MappedFileVolSingle, Volume.MemoryVol, Volume.MemoryVolSingle, Volume.RandomAccessFileVol, Volume.ReadOnly, Volume.SingleByteArrayVol, Volume.VolumeFactory| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
data |
protected static Volume.VolumeFactory |
FACTORY |
closed, LOG, UNSAFE_VOL_FACTORY| Constructor and Description |
|---|
Volume.SingleByteArrayVol(byte[] data) |
Volume.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 |
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) |
DataInput |
getDataInput(long offset,
int size) |
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 |
isSliced() |
long |
length() |
void |
putByte(long offset,
byte value) |
void |
putData(long offset,
byte[] src,
int srcPos,
int srcSize) |
void |
putData(long offset,
ByteBuffer buf) |
void |
putInt(long offset,
int value) |
void |
putLong(long offset,
long v) |
int |
sliceSize() |
void |
sync() |
void |
transferInto(long inputOffset,
Volume target,
long targetOffset,
long size)
Transfers data from this Volume into target volume.
|
void |
truncate(long size) |
assertZeroes, copyEntireVolumeTo, deleteFile, fileLoad, finalize, getDataInputOverlap, getLongPackBidi, getLongPackBidiReverse, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, hash, isClosed, putDataOverlap, putLongPackBidi, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, volumeTransferprotected static final Volume.VolumeFactory FACTORY
protected final byte[] data
public Volume.SingleByteArrayVol(int size)
public Volume.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,
ByteBuffer buf)
public void transferInto(long inputOffset,
Volume target,
long targetOffset,
long size)
VolumetransferInto in class VolumeinputOffset - offset inside this Volume, ie data will be read from this offsettarget - Volume to copy data intotargetOffset - position in target volume where data will be copied intosize - size of data to copypublic void clear(long startOffset,
long endOffset)
VolumestartOffset and endOffset to zero.
Area between offsets must be ready for write once clear finishes.public DataInput 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 File getFile()
Volumepublic boolean getFileLocked()
VolumegetFileLocked in class VolumeCopyright © 2015. All Rights Reserved.