code: public void writeExternal(ObjectOutput out) throws IOException
     {
        out.writeInt(orderNumber);
  
        // write canonical file path
        if (file != null)
        {
           byte[] buf = PrivilegedFileHelper.getCanonicalPath(file).getBytes("UTF-8");
           out.writeInt(buf.length);
           out.write(buf);
        }
        else
        {
           // The file is not available which should not occur but instead of
           // raising an exception we just allow it since we have a way to recover
           out.writeInt(0);
        }
     }
docs: {@inheritDoc}