Package org.apache.xmlgraphics.xmp
Class XMPSerializer
java.lang.Object
org.apache.xmlgraphics.xmp.XMPSerializer
Serializes an XMP tree to XML or to an XMP packet.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidWrites the in-memory representation of the XMP metadata to a JAXP Result.private static voidstatic voidwriteXMPPacket(Metadata meta, OutputStream out, boolean readOnlyXMP) Writes the in-memory representation of the XMP metadata to an OutputStream as an XMP packet.
-
Field Details
-
DEFAULT_ENCODING
- See Also:
-
-
Constructor Details
-
XMPSerializer
private XMPSerializer()
-
-
Method Details
-
writeXML
public static void writeXML(Metadata meta, Result res) throws TransformerConfigurationException, SAXException Writes the in-memory representation of the XMP metadata to a JAXP Result.- Parameters:
meta- the metadatares- the JAXP Result to write to- Throws:
TransformerConfigurationException- if an error occurs setting up the XML infrastructure.SAXException- if a SAX-related problem occurs while writing the XML
-
writeXMPPacket
public static void writeXMPPacket(Metadata meta, OutputStream out, boolean readOnlyXMP) throws TransformerConfigurationException, SAXException Writes the in-memory representation of the XMP metadata to an OutputStream as an XMP packet.- Parameters:
meta- the metadataout- the stream to write toreadOnlyXMP- true if the generated XMP packet should be read-only- Throws:
TransformerConfigurationException- if an error occurs setting up the XML infrastructure.SAXException- if a SAX-related problem occurs while writing the XML
-
writeXML
private static void writeXML(Metadata meta, Result res, boolean asXMPPacket, boolean readOnlyXMP) throws TransformerConfigurationException, SAXException
-