code: public void writeExternal(ObjectOutput out) throws IOException
     {
        out.writeInt(orderNumber);
  
        byte[] data = value.getIdentity().getBytes(Constants.DEFAULT_ENCODING);
        out.writeInt(data.length);
  
        if (data.length > 0)
        {
           out.write(data);
        }
  
        data = value.getPermission().getBytes(Constants.DEFAULT_ENCODING);
        out.writeInt(data.length);
  
        if (data.length > 0)
        {
           out.write(data);
        }
  
     }
docs: {@inheritDoc}