@Override public ByteBufferImpl readObject(ObjectInput input) throws IOException, ClassNotFoundException { int length = UnsignedNumeric.readUnsignedInt(input); byte[] data = new byte[length]; input.readFully(data, 0, length); return new ByteBufferImpl(data, 0, length); }
@Override public void writeObject(ObjectOutput output, ByteBufferImpl b) throws IOException { UnsignedNumeric.writeUnsignedInt(output, b.length); output.write(b.buf, b.offset, b.length); }