public class XMPSerializerHelper extends Object
XMPMeta-object to an OutputStream according to the
SerializeOptions.| Constructor and Description |
|---|
XMPSerializerHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
serialize(XMPMetaImpl xmp,
OutputStream out,
SerializeOptions options)
Static method to serialize the metadata object.
|
static byte[] |
serializeToBuffer(XMPMetaImpl xmp,
SerializeOptions options)
Serializes an
XMPMeta-object as RDF into a byte buffer. |
static String |
serializeToString(XMPMetaImpl xmp,
SerializeOptions options)
Serializes an
XMPMeta-object as RDF into a string. |
public static void serialize(XMPMetaImpl xmp, OutputStream out, SerializeOptions options) throws XMPException
xmp - a metadata implementation objectout - the output stream to serialize tooptions - serialization options, can be null for default.XMPExceptionpublic static String serializeToString(XMPMetaImpl xmp, SerializeOptions options) throws XMPException
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".xmp - a metadata implementation objectoptions - Options to control the serialization (see
SerializeOptions).XMPException - on serializsation errors.public static byte[] serializeToBuffer(XMPMetaImpl xmp, SerializeOptions options) throws XMPException
XMPMeta-object as RDF into a byte buffer.xmp - a metadata implementation objectoptions - Options to control the serialization (see SerializeOptions).XMPException - on serializsation errors.Copyright © 2015–2021 The veraPDF Consortium. All rights reserved.