docs: public static boolean write(OutputStream os, Metadata data)
      {
          XmpDirectory dir = data.getFirstDirectoryOfType(XmpDirectory.class);
          if (dir == null)
              return false;
          XMPMeta meta = dir.getXMPMeta();
          try
          {
              SerializeOptions so = new SerializeOptions().setOmitPacketWrapper(true);
              XMPMetaFactory.serialize(meta, os, so);
          }
          catch (XMPException e)
          {
              e.printStackTrace();
              return false;
          }
          return true;
      }