*/
public static String serializeToString(XMPMetaImpl xmp, SerializeOptions options)
throws XMPException
{
// forces the encoding to be UTF-16 to get the correct string length
options = options != null ? options : new SerializeOptions();
options.setEncodeUTF16BE(true);
ByteArrayOutputStream out = new ByteArrayOutputStream(2048);
serialize(xmp, out, options);