@Override public long getSerializedSize() throws IOException { writeLastOffset(); return 1 + offsetWriter.getSerializedSize() + valueWriter.getSerializedSize(); }
@Override public void writeTo(WritableByteChannel channel, FileSmoosher smoosher) throws IOException { writeLastOffset(); Channels.writeFully(channel, ByteBuffer.wrap(new byte[]{VERSION})); offsetWriter.writeTo(channel, smoosher); valueWriter.writeTo(channel, smoosher); }
@Override public long getSerializedSize() throws IOException { writeLastOffset(); return 1 + offsetWriter.getSerializedSize() + valueWriter.getSerializedSize(); }
@Override public void writeTo(WritableByteChannel channel, FileSmoosher smoosher) throws IOException { writeLastOffset(); Channels.writeFully(channel, ByteBuffer.wrap(new byte[]{VERSION})); offsetWriter.writeTo(channel, smoosher); valueWriter.writeTo(channel, smoosher); }