Dn dn1 = new Dn( schemaManager, "gn=john + cn=doe, dc=example, dc=com" );
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream( baos );
dn1.writeExternal( out );
ObjectInputStream in = null;
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );