public class XmpWriter extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected String |
about
The about string that goes into the rdf:Description tags.
|
protected char |
end
The end attribute.
|
protected int |
extraSpace
You can add some extra space in the XMP packet; 1 unit in this variable represents 100 spaces and a newline.
|
static String |
EXTRASPACE
String used to fill the extra space.
|
static String |
UTF16
A possible charset for the XMP.
|
static String |
UTF16BE
A possible charset for the XMP.
|
static String |
UTF16LE
A possible charset for the XMP.
|
static String |
UTF8
A possible charset for the XMP.
|
protected OutputStreamWriter |
writer
The writer to which you can write bytes for the XMP stream.
|
static String |
XPACKET_PI_BEGIN
Processing Instruction required at the start of an XMP stream
|
static String |
XPACKET_PI_END_R
Processing Instruction required at the end of an XMP stream for XMP streams that are read only
|
static String |
XPACKET_PI_END_W
Processing Instruction required at the end of an XMP stream for XMP streams that can be updated
|
| Constructor and Description |
|---|
XmpWriter(OutputStream os)
Creates an XmpWriter.
|
XmpWriter(OutputStream os,
Map info) |
XmpWriter(OutputStream os,
PdfDictionary info,
int PdfXConformance) |
XmpWriter(OutputStream os,
String utfEncoding,
int extraSpace)
Creates an XmpWriter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRdfDescription(String xmlns,
String content)
Adds an rdf:Description.
|
void |
addRdfDescription(XmpSchema s)
Adds an rdf:Description.
|
void |
close()
Flushes and closes the XmpWriter.
|
void |
setAbout(String about) |
void |
setReadOnly()
Sets the XMP to read-only
|
public static final String UTF8
public static final String UTF16
public static final String UTF16BE
public static final String UTF16LE
public static final String EXTRASPACE
public static final String XPACKET_PI_BEGIN
public static final String XPACKET_PI_END_W
public static final String XPACKET_PI_END_R
protected int extraSpace
protected OutputStreamWriter writer
protected String about
protected char end
public XmpWriter(OutputStream os, String utfEncoding, int extraSpace) throws IOException
os - output streamutfEncoding - utf encoding to be usedextraSpace - extra spaceIOException - on errorpublic XmpWriter(OutputStream os) throws IOException
os - output streamIOException - on errorpublic XmpWriter(OutputStream os, PdfDictionary info, int PdfXConformance) throws IOException
os - output streaminfo - PdfDictionaryPdfXConformance - pdf conformance eg. values PdfWriter.PDFA1A, PdfWriter.PDFA1BIOException - on errorpublic XmpWriter(OutputStream os, Map info) throws IOException
os - output streaminfo - map of infoIOException - on errorpublic void setReadOnly()
public void setAbout(String about)
about - The about to set.public void addRdfDescription(String xmlns, String content) throws IOException
xmlns - xml namespacecontent - contentIOException - on errorpublic void addRdfDescription(XmpSchema s) throws IOException
s - xmp schemaIOException - on errorpublic void close()
throws IOException
close in interface AutoCloseableIOException - on errorCopyright © 2024. All rights reserved.