Package com.aowagie.text.xml.xmp
Class XmpWriter
- java.lang.Object
-
- com.aowagie.text.xml.xmp.XmpWriter
-
public class XmpWriter extends java.lang.ObjectWith this class you can create an Xmp Stream that can be used for adding Metadata to a PDF Dictionary. Remark that this class doesn't cover the complete XMP specification.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringaboutThe about string that goes into the rdf:Description tags.private charendThe end attribute.private intextraSpaceYou can add some extra space in the XMP packet; 1 unit in this variable represents 100 spaces and a newline.(package private) static java.lang.StringEXTRASPACEString used to fill the extra space.private static java.lang.StringUTF8A possible charset for the XMP.private java.io.OutputStreamWriterwriterThe writer to which you can write bytes for the XMP stream.(package private) static java.lang.StringXPACKET_PI_BEGINProcessing Instruction required at the start of an XMP streamprivate static java.lang.StringXPACKET_PI_END_RProcessing Instruction required at the end of an XMP stream for XMP streams that are read only(package private) static java.lang.StringXPACKET_PI_END_WProcessing Instruction required at the end of an XMP stream for XMP streams that can be updated
-
Constructor Summary
Constructors Modifier Constructor Description XmpWriter(java.io.OutputStream os)Creates an XmpWriter.XmpWriter(java.io.OutputStream os, PdfDictionary info, int PdfXConformance)privateXmpWriter(java.io.OutputStream os, java.lang.String utfEncoding, int extraSpace)Creates an XmpWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRdfDescription(XmpSchema s)Adds an rdf:Description.voidclose()Flushes and closes the XmpWriter.voidsetAbout(java.lang.String about)
-
-
-
Field Detail
-
UTF8
private static final java.lang.String UTF8
A possible charset for the XMP.
-
EXTRASPACE
static final java.lang.String EXTRASPACE
String used to fill the extra space.- See Also:
- Constant Field Values
-
extraSpace
private final int extraSpace
You can add some extra space in the XMP packet; 1 unit in this variable represents 100 spaces and a newline.
-
writer
private final java.io.OutputStreamWriter writer
The writer to which you can write bytes for the XMP stream.
-
about
private java.lang.String about
The about string that goes into the rdf:Description tags.
-
XPACKET_PI_BEGIN
static final java.lang.String XPACKET_PI_BEGIN
Processing Instruction required at the start of an XMP stream- Since:
- iText 2.1.6
- See Also:
- Constant Field Values
-
XPACKET_PI_END_W
static final java.lang.String XPACKET_PI_END_W
Processing Instruction required at the end of an XMP stream for XMP streams that can be updated- Since:
- iText 2.1.6
- See Also:
- Constant Field Values
-
XPACKET_PI_END_R
private static final java.lang.String XPACKET_PI_END_R
Processing Instruction required at the end of an XMP stream for XMP streams that are read only- Since:
- iText 2.1.6
- See Also:
- Constant Field Values
-
end
private final char end
The end attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XmpWriter
private XmpWriter(java.io.OutputStream os, java.lang.String utfEncoding, int extraSpace) throws java.io.IOExceptionCreates an XmpWriter.- Parameters:
os-utfEncoding-extraSpace-- Throws:
java.io.IOException
-
XmpWriter
public XmpWriter(java.io.OutputStream os) throws java.io.IOExceptionCreates an XmpWriter.- Parameters:
os- output stream to set- Throws:
java.io.IOException- Exception with a IO error
-
XmpWriter
public XmpWriter(java.io.OutputStream os, PdfDictionary info, int PdfXConformance) throws java.io.IOException- Parameters:
os- output stream to setinfo- info to setPdfXConformance- pdf to set- Throws:
java.io.IOException- Exception with a IO error
-
-
Method Detail
-
setAbout
public void setAbout(java.lang.String about)
- Parameters:
about- The about to set.
-
addRdfDescription
public void addRdfDescription(XmpSchema s) throws java.io.IOException
Adds an rdf:Description.- Parameters:
s- schema to set- Throws:
java.io.IOException- Exception with a IO error
-
close
public void close() throws java.io.IOExceptionFlushes and closes the XmpWriter.- Throws:
java.io.IOException- Exception with a IO error
-
-