public static final class Volume.ReadOnly 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 Volume |
vol |
closed, LOG, UNSAFE_VOL_FACTORY| Constructor and Description |
|---|
Volume.ReadOnly(Volume vol) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(long startOffset,
long endOffset)
Set all bytes between
startOffset and endOffset to zero. |
void |
close() |
void |
deleteFile() |
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 size) |
DataInput |
getDataInput(long offset,
int size) |
DataInput |
getDataInputOverlap(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) |
long |
getLongPackBidi(long offset) |
long |
getLongPackBidiReverse(long offset,
long limitOffset) |
long |
getSixLong(long pos) |
int |
getUnsignedByte(long offset) |
int |
getUnsignedShort(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 |
putDataOverlap(long offset,
byte[] src,
int srcPos,
int srcSize) |
void |
putInt(long offset,
int value) |
void |
putLong(long offset,
long value) |
int |
putLongPackBidi(long offset,
long value) |
void |
putSixLong(long pos,
long value) |
void |
putUnsignedByte(long offset,
int b) |
void |
putUnsignedShort(long offset,
int value) |
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, fileLoad, finalize, getPackedLong, hash, isClosed, putPackedLong, volumeTransferprotected final Volume vol
public Volume.ReadOnly(Volume vol)
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 putDataOverlap(long offset,
byte[] src,
int srcPos,
int srcSize)
putDataOverlap in class Volumepublic DataInput getDataInput(long offset, int size)
getDataInput in class Volumepublic DataInput getDataInputOverlap(long offset, int size)
getDataInputOverlap in class Volumepublic void getData(long offset,
byte[] bytes,
int bytesPos,
int size)
public void close()
public int sliceSize()
public void deleteFile()
deleteFile in class Volumepublic void putUnsignedShort(long offset,
int value)
putUnsignedShort in class Volumepublic int getUnsignedShort(long offset)
getUnsignedShort in class Volumepublic int getUnsignedByte(long offset)
getUnsignedByte in class Volumepublic void putUnsignedByte(long offset,
int b)
putUnsignedByte in class Volumepublic int putLongPackBidi(long offset,
long value)
putLongPackBidi in class Volumepublic long getLongPackBidi(long offset)
getLongPackBidi in class Volumepublic long getLongPackBidiReverse(long offset,
long limitOffset)
getLongPackBidiReverse in class Volumepublic long getSixLong(long pos)
getSixLong in class Volumepublic void putSixLong(long pos,
long value)
putSixLong in class Volumepublic File getFile()
Volumepublic boolean getFileLocked()
VolumegetFileLocked in class Volumepublic 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 copyCopyright © 2015. All Rights Reserved.