protected byte[] flattenAction (NodeAction action)
    {
        try {
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            ObjectOutputStream oout = new ObjectOutputStream(bout);
            oout.writeObject(action);
            return bout.toByteArray();
        } catch (Exception e) {
            throw new IllegalArgumentException(
                "Failed to serialize node action [action=" + action + "].", e);
        }
    }
protected byte [ ] flattenAction ( NodeAction action ) { try { ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; ObjectOutputStream oout = new ObjectOutputStream ( bout ) ; oout . writeObject ( action ) ; return bout . toByteArray ( ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "Failed to serialize node action [action=" + action + "]." , e ) ; } }
Flattens the supplied node action into bytes.