ExposedByteArrayOutputStream baos = new ExposedByteArrayOutputStream(1024);
ObjectOutput globalOO = globalMarshal.startObjectOutput(baos, false, 1024);
try {
globalOO.writeObject(address);
} finally {
globalMarshal.finishObjectOutput(globalOO);
}
byte[] bytes = new byte[baos.size()];
System.arraycopy(baos.getRawBuffer(), 0, bytes, 0, bytes.length);