public final class ReadOnlyVolume extends Volume
| Modifier and Type | Field and Description |
|---|---|
protected Volume |
vol |
closed, LOG, UNSAFE_VOL_FACTORY| Constructor and Description |
|---|
ReadOnlyVolume(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 |
copyTo(long inputOffset,
Volume target,
long targetOffset,
long size)
Transfers data from this Volume into target volume.
|
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) |
DataInput2 |
getDataInput(long offset,
int size) |
DataInput2 |
getDataInputOverlap(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) |
long |
getSixLong(long pos) |
int |
getUnsignedByte(long offset) |
int |
getUnsignedShort(long offset) |
boolean |
isClosed() |
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 |
putDataOverlap(long offset,
byte[] src,
int srcPos,
int srcSize) |
void |
putInt(long offset,
int value) |
void |
putLong(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 |
truncate(long size) |
assertZeroes, clearOverlap, copyFrom, copyTo, copyTo, fileLoad, finalize, getPackedLong, hash, putPackedLongprotected final Volume vol
public ReadOnlyVolume(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,
java.nio.ByteBuffer buf)
public void putDataOverlap(long offset,
byte[] src,
int srcPos,
int srcSize)
putDataOverlap in class Volumepublic DataInput2 getDataInput(long offset, int size)
getDataInput in class Volumepublic DataInput2 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 long getSixLong(long pos)
getSixLong in class Volumepublic void putSixLong(long pos,
long value)
putSixLong in class Volumepublic boolean isReadOnly()
isReadOnly in class Volumepublic java.io.File getFile()
Volumepublic boolean getFileLocked()
VolumegetFileLocked in class Volumepublic void copyTo(long inputOffset,
Volume target,
long targetOffset,
long size)
VolumeCopyright © 2018. All Rights Reserved.