/// <summary>Serializes an <code>XMPMeta</code>-object as RDF into a byte buffer.</summary> /// <param name="xmp">a metadata object</param> /// <param name="options"> /// Options to control the serialization (see /// <see cref="Com.Adobe.Xmp.Options.SerializeOptions"/> /// ). /// </param> /// <returns>Returns a byte buffer containing the serialized RDF.</returns> /// <exception cref="XMPException">on serializsation errors.</exception> /// <exception cref="Com.Adobe.Xmp.XMPException"/> public static sbyte[] SerializeToBuffer(XMPMeta xmp, SerializeOptions options) { AssertImplementation(xmp); return(XMPSerializerHelper.SerializeToBuffer((XMPMetaImpl)xmp, options)); }
/// <summary>Serializes an <code>XMPMeta</code>-object as RDF into a string.</summary> /// <remarks> /// Serializes an <code>XMPMeta</code>-object as RDF into a string. <em>Note:</em> Encoding /// is ignored when serializing to a string. /// </remarks> /// <param name="xmp">a metadata object</param> /// <param name="options"> /// Options to control the serialization (see /// <see cref="Com.Adobe.Xmp.Options.SerializeOptions"/> /// ). /// </param> /// <returns>Returns a string containing the serialized RDF.</returns> /// <exception cref="XMPException">on serializsation errors.</exception> /// <exception cref="Com.Adobe.Xmp.XMPException"/> public static string SerializeToString(XMPMeta xmp, SerializeOptions options) { AssertImplementation(xmp); return(XMPSerializerHelper.SerializeToString((XMPMetaImpl)xmp, options)); }
/// <summary>Serializes an <code>XMPMeta</code>-object as RDF into an <code>OutputStream</code>.</summary> /// <param name="xmp">a metadata object</param> /// <param name="options"> /// Options to control the serialization (see /// <see cref="Com.Adobe.Xmp.Options.SerializeOptions"/> /// ). /// </param> /// <param name="out">an <code>OutputStream</code> to write the serialized RDF to.</param> /// <exception cref="XMPException">on serializsation errors.</exception> /// <exception cref="Com.Adobe.Xmp.XMPException"/> public static void Serialize(XMPMeta xmp, OutputStream @out, SerializeOptions options) { AssertImplementation(xmp); XMPSerializerHelper.Serialize((XMPMetaImpl)xmp, @out, options); }