iText 7 7.1.8 API
iText.Kernel.XMP.Impl.XMPSerializerHelper Class Reference

Serializes the More...

Static Public Member Functions

static void  Serialize (XMPMetaImpl xmp, Stream output, SerializeOptions options)
  Static method to serialize the metadata object. More...
 
static String  SerializeToString (XMPMetaImpl xmp, SerializeOptions options)
  Serializes an More...
 
static byte[]  SerializeToBuffer (XMPMetaImpl xmp, SerializeOptions options)
  Serializes an More...
 

Detailed Description

Serializes the

XMPMeta-object to an OutputStream according to the SerializeOptions.

11.07.2006

Member Function Documentation

◆ Serialize()

static void iText.Kernel.XMP.Impl.XMPSerializerHelper.Serialize ( XMPMetaImpl  xmp,
Stream  output,
SerializeOptions  options 
)
inlinestatic

Static method to serialize the metadata object.

Static method to serialize the metadata object. For each serialisation, a new XMPSerializer instance is created, either XMPSerializerRDF or XMPSerializerPlain so thats its possible to serialialize the same XMPMeta objects in two threads.

Parameters
xmp a metadata implementation object
out the output stream to serialize to
options serialization options, can be
null
for default.
Exceptions
iText.Kernel.XMP.XMPException

◆ SerializeToBuffer()

static byte [] iText.Kernel.XMP.Impl.XMPSerializerHelper.SerializeToBuffer ( XMPMetaImpl  xmp,
SerializeOptions  options 
)
inlinestatic

Serializes an

XMPMeta-object as RDF into a byte buffer.

Parameters
xmp a metadata implementation object
options Options to control the serialization (see iText.Kernel.XMP.Options.SerializeOptions ).
Returns
Returns a byte buffer containing the serialized RDF.
Exceptions
iText.Kernel.XMP.XMPException on serializsation errors.

◆ SerializeToString()

static String iText.Kernel.XMP.Impl.XMPSerializerHelper.SerializeToString ( XMPMetaImpl  xmp,
SerializeOptions  options 
)
inlinestatic

Serializes an

XMPMeta-object as RDF into a string.

Serializes an

XMPMeta

-object as RDF into a string. Note: Encoding is forced to UTF-16 when serializing to a string to ensure the correctness of "exact packet size".

Parameters
xmp a metadata implementation object
options Options to control the serialization (see iText.Kernel.XMP.Options.SerializeOptions ).
Returns
Returns a string containing the serialized RDF.
Exceptions
iText.Kernel.XMP.XMPException on serializsation errors.