public class XmpWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.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 java.lang.String |
EXTRASPACE
String used to fill the extra space.
|
static java.lang.String |
UTF16
A possible charset for the XMP.
|
static java.lang.String |
UTF16BE
A possible charset for the XMP.
|
static java.lang.String |
UTF16LE
A possible charset for the XMP.
|
static java.lang.String |
UTF8
A possible charset for the XMP.
|
protected java.io.OutputStreamWriter |
writer
The writer to which you can write bytes for the XMP stream.
|
Constructor and Description |
---|
XmpWriter(java.io.OutputStream os)
Creates an XmpWriter.
|
XmpWriter(java.io.OutputStream os,
java.util.Map info) |
XmpWriter(java.io.OutputStream os,
PdfDictionary info) |
XmpWriter(java.io.OutputStream os,
java.lang.String utfEncoding,
int extraSpace)
Creates an XmpWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
addRdfDescription(java.lang.String xmlns,
java.lang.String content)
Adds an rdf:Description.
|
void |
addRdfDescription(XmpSchema s)
Adds an rdf:Description.
|
void |
close()
Flushes and closes the XmpWriter.
|
void |
setAbout(java.lang.String about) |
void |
setReadOnly()
Sets the XMP to read-only
|
public static final java.lang.String UTF8
public static final java.lang.String UTF16
public static final java.lang.String UTF16BE
public static final java.lang.String UTF16LE
public static final java.lang.String EXTRASPACE
protected int extraSpace
protected java.io.OutputStreamWriter writer
protected java.lang.String about
protected char end
public XmpWriter(java.io.OutputStream os, java.lang.String utfEncoding, int extraSpace) throws java.io.IOException
os
- utfEncoding
- extraSpace
- java.io.IOException
public XmpWriter(java.io.OutputStream os) throws java.io.IOException
os
- java.io.IOException
public XmpWriter(java.io.OutputStream os, PdfDictionary info) throws java.io.IOException
os
- info
- java.io.IOException
public XmpWriter(java.io.OutputStream os, java.util.Map info) throws java.io.IOException
os
- info
- java.io.IOException
public void setReadOnly()
public void setAbout(java.lang.String about)
about
- The about to set.public void addRdfDescription(java.lang.String xmlns, java.lang.String content) throws java.io.IOException
xmlns
- content
- java.io.IOException
public void addRdfDescription(XmpSchema s) throws java.io.IOException
s
- java.io.IOException
public void close() throws java.io.IOException
java.io.IOException