@Override public Dn deserialize( BufferHandler bufferHandler ) throws IOException { ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( bufferHandler.getBuffer() ) ); try { Dn dn = new Dn(); dn.readExternal( in ); return dn; } catch ( ClassNotFoundException cnfe ) { LOG.error( I18n.err( I18n.ERR_134, cnfe.getLocalizedMessage() ) ); throw new IOException( cnfe.getLocalizedMessage() ); } }
/** * {@inheritDoc} */ @Override public Dn fromBytes( byte[] buffer, int pos ) throws IOException { int length = buffer.length - pos; ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( buffer, pos, length ) ); try { Dn dn = new Dn(); dn.readExternal( in ); return dn; } catch ( ClassNotFoundException cnfe ) { LOG.error( I18n.err( I18n.ERR_134, cnfe.getLocalizedMessage() ) ); throw new IOException( cnfe.getLocalizedMessage() ); } }
/** * Deserialize a Dn. * * @param bytes the byte array containing the serialized Dn * @return An instance of a Dn object * @throws IOException if we can't deserialize the Dn */ public Object deserialize( byte[] bytes ) throws IOException { ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( bytes ) ); try { Dn dn = new Dn(); dn.readExternal( in ); return dn; } catch ( ClassNotFoundException cnfe ) { LOG.error( I18n.err( I18n.ERR_134, cnfe.getLocalizedMessage() ) ); throw new IOException( cnfe.getLocalizedMessage() ); } } }
entryDn.readExternal( in ); entryDn.readExternal( in ); entryDn.readExternal( in );
entryDn.readExternal( in ); entryDn.readExternal( in ); entryDn.readExternal( in );
entryDn.readExternal( in ); entryDn.readExternal( in ); entryDn.readExternal( in );
dn.readExternal( in ); entry.setDn( dn );