public int getSerializedSize() throws SerializationException {
        DocumentSerializer data = DocumentSerializerFactory.createHead(new GrowableByteBuffer(8 * 1024, 2.0f));
        data.write(this);
        return data.getBuf().position();
    }
@param reader The deserializer to use for creating this document
document/src/main/java/com/yahoo/document/Document.java