code: public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
     {
        orderNumber = in.readInt();
  
        // read canonical file path
        int size = in.readInt();
        if (size > 0)
        {
           byte[] buf = new byte[size];
           in.readFully(buf);
           final String path = new String(buf, "UTF-8");
           File f = new File(path);
           // validate if exists
           if (PrivilegedFileHelper.exists(f))
           {
              file = f;
           }
           else if (path.startsWith(ValueStorageURLStreamHandler.PROTOCOL + ":/"))
           {
              url = SecurityHelper.doPrivilegedMalformedURLExceptionAction(new PrivilegedExceptionAction<URL>()
              {
                 public URL run() throws Exception
                 {
                    return new URL(null, path, ValueStorageURLStreamHandler.INSTANCE);
                 }
              });
           }
           else
           {
              file = null;
              url = null;
           }
        }
        else
        {
           // should not occurs but since we have a way to recover, it should not be
           // an issue
           file = null;
           url = null;
        }
     }
docs: {@inheritDoc}