public interface DataItem extends Item, java.nio.channels.SeekableByteChannel
| Modifier and Type | Field and Description |
|---|---|
static double |
LOG2 |
| Modifier and Type | Method and Description |
|---|---|
void |
commitUpdatedRanges(java.util.BitSet[] updatingRangesMask) |
DataInput |
getDataInput() |
static int |
getRangeCount(long size) |
static long |
getRangeOffset(int i) |
long |
getRangeSize(int rangeIdx) |
int |
getUpdatedRangesCount() |
boolean |
isRangeUpdated(int rangeIdx) |
boolean |
isUpdated() |
int |
layer() |
void |
layer(int layerNum) |
long |
offset() |
void |
offset(long offset) |
int |
readAndVerify(java.nio.channels.ReadableByteChannel chanSrc,
java.nio.ByteBuffer buff) |
void |
reset() |
void |
setDataInput(DataInput dataInput) |
void |
size(long size) |
<D extends DataItem> |
slice(long from,
long size) |
long |
writeToFileChannel(java.nio.channels.FileChannel chanDst,
long maxCount) |
long |
writeToSocketChannel(java.nio.channels.WritableByteChannel chanDst,
long maxCount) |
DataInput getDataInput()
void setDataInput(DataInput dataInput)
int layer()
void layer(int layerNum)
void size(long size)
long offset()
void offset(long offset)
<D extends DataItem> D slice(long from, long size)
long writeToSocketChannel(java.nio.channels.WritableByteChannel chanDst,
long maxCount)
throws java.io.IOException
java.nio.channels.NonWritableChannelException - If this channel was not opened for writingjava.nio.channels.ClosedChannelException - If this channel is closedjava.nio.channels.AsynchronousCloseException - If another thread closes this channel
while the write operation is in progressjava.nio.channels.ClosedByInterruptException - If another thread interrupts the current thread
while the write operation is in progress, thereby
closing the channel and setting the current thread's
interrupt statusjava.io.IOException - If some other I/O error occurslong writeToFileChannel(java.nio.channels.FileChannel chanDst,
long maxCount)
throws java.io.IOException
java.io.IOExceptionint readAndVerify(java.nio.channels.ReadableByteChannel chanSrc,
java.nio.ByteBuffer buff)
throws DataSizeException,
DataCorruptionException,
java.io.IOException
DataSizeExceptionDataCorruptionExceptionjava.io.IOExceptionstatic int getRangeCount(long size)
static long getRangeOffset(int i)
long getRangeSize(int rangeIdx)
boolean isUpdated()
boolean isRangeUpdated(int rangeIdx)
int getUpdatedRangesCount()
void commitUpdatedRanges(java.util.BitSet[] updatingRangesMask)