@Override public void close() { snapshot.closeWriter(this); buffer.close(); }
@Override protected void closeWriter(SnapshotWriter writer) { int length = (int) (writer.buffer.position() - (SnapshotDescriptor.BYTES + Integer.BYTES)); writer.buffer.writeInt(SnapshotDescriptor.BYTES, length).flush(); super.closeWriter(writer); }