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, putPackedLong
protected final Volume vol
public ReadOnlyVolume(Volume vol)
public void ensureAvailable(long offset)
Volume
ensureAvailable
in class Volume
public 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 Volume
public DataInput2 getDataInput(long offset, int size)
getDataInput
in class Volume
public DataInput2 getDataInputOverlap(long offset, int size)
getDataInputOverlap
in class Volume
public void getData(long offset, byte[] bytes, int bytesPos, int size)
public void close()
public int sliceSize()
public void deleteFile()
deleteFile
in class Volume
public void putUnsignedShort(long offset, int value)
putUnsignedShort
in class Volume
public int getUnsignedShort(long offset)
getUnsignedShort
in class Volume
public int getUnsignedByte(long offset)
getUnsignedByte
in class Volume
public void putUnsignedByte(long offset, int b)
putUnsignedByte
in class Volume
public long getSixLong(long pos)
getSixLong
in class Volume
public void putSixLong(long pos, long value)
putSixLong
in class Volume
public boolean isReadOnly()
isReadOnly
in class Volume
public java.io.File getFile()
Volume
public boolean getFileLocked()
Volume
getFileLocked
in class Volume
public void copyTo(long inputOffset, Volume target, long targetOffset, long size)
Volume
Copyright © 2018. All Rights Reserved.