public static Slice writeBlockHandle(BlockHandle blockHandle)
{
Slice slice = Slices.allocate(MAX_ENCODED_LENGTH);
SliceOutput sliceOutput = slice.output();
writeBlockHandleTo(blockHandle, sliceOutput);
return slice.slice();
}
public static void writeBlockHandleTo(BlockHandle blockHandle, SliceOutput sliceOutput)
{
VariableLengthQuantity.writeVariableLengthLong(blockHandle.offset, sliceOutput);
VariableLengthQuantity.writeVariableLengthLong(blockHandle.dataSize, sliceOutput);