{
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(buffer);
WriteImpl writer = new WriteImpl(out);
writer.setValue(nullReplacement);
writer.handle(type);
out.flush();
out.close();
byte[] binary = buffer.toByteArray();
String base64 = SerializableUtil.serializeToBase64(binary);