String charEncoding = "UTF-8";
int transContext = DOTranslationUtility.SERIALIZE_STORAGE_INTERNAL;
ByteArrayOutputStream out = new ByteArrayOutputStream();
FOXML1_1DOSerializer ser = new FOXML1_1DOSerializer();
ser.serialize(obj, out, charEncoding, transContext);
FOXML1_1DODeserializer deser = new FOXML1_1DODeserializer();
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
DigitalObject objCopy = new BasicDigitalObject();
deser.deserialize(in, objCopy, charEncoding, transContext);