public class XmpWriter extends Object
Modifier and Type | Field and Description |
---|---|
protected OutputStream |
outputStream |
protected SerializeOptions |
serializeOptions |
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 XMPMeta |
xmpMeta |
Constructor and Description |
---|
XmpWriter(OutputStream os)
Creates an XmpWriter.
|
XmpWriter(OutputStream os, Map<String,String> info) |
XmpWriter(OutputStream os, PdfDictionary info) |
XmpWriter(OutputStream os, String utfEncoding, int extraSpace)
Creates an XmpWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
addDocInfoProperty(Object key, String value) |
void |
addRdfDescription(String xmlns, String content)
Deprecated.
|
void |
addRdfDescription(XmpSchema s)
Deprecated.
|
void |
appendAlternateArrayItem(String schemaNS, String arrayName, String value)
Simplifies the construction of an alternate array by not requiring that you pre-create an empty array.
|
void |
appendArrayItem(String schemaNS, String arrayName, String value)
Simplifies the construction of an array by not requiring that you pre-create an empty array.
|
void |
appendOrderedArrayItem(String schemaNS, String arrayName, String value)
Simplifies the construction of an ordered array by not requiring that you pre-create an empty array.
|
void |
close()
Flushes and closes the XmpWriter.
|
XMPMeta |
getXmpMeta() |
void |
serialize(OutputStream externalOutputStream)
Flushes and closes the XmpWriter.
|
void |
setAbout(String about) |
void |
setProperty(String schemaNS, String propName, Object value) |
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
protected XMPMeta xmpMeta
protected OutputStream outputStream
protected SerializeOptions serializeOptions
public XmpWriter(OutputStream os, String utfEncoding, int extraSpace) throws IOException
os
-
utfEncoding
-
extraSpace
-
IOException
public XmpWriter(OutputStream os) throws IOException
os
-
IOException
public XmpWriter(OutputStream os, PdfDictionary info) throws IOException
os
-
info
-
IOException
public XmpWriter(OutputStream os, Map<String,String> info) throws IOException
os
-
info
-
IOException
public XMPMeta getXmpMeta()
public void setReadOnly()
public void setAbout(String about)
about
- The about to set.
@Deprecated public void addRdfDescription(String xmlns, String content) throws IOException
xmlns
-
content
-
IOException
@Deprecated public void addRdfDescription(XmpSchema s) throws IOException
s
-
IOException
public void setProperty(String schemaNS, String propName, Object value) throws XMPException
schemaNS
- The namespace URI for the property. Has the same usage as in getProperty.
propName
- The name of the property. Has the same usage as in getProperty()
.
value
- the value for the property (only leaf properties have a value). Arrays and non-leaf levels of structs do not have values. Must be null
if the value is not relevant.
toString()
is called.
XMPException
- Wraps all errors and exceptions that may occur.
public void appendArrayItem(String schemaNS, String arrayName, String value) throws XMPException
schemaNS
- The namespace URI for the array.
arrayName
- The name of the array. May be a general path expression, must not be null or the empty string.
value
- the value of the array item.
XMPException
- Wraps all errors and exceptions that may occur.
public void appendOrderedArrayItem(String schemaNS, String arrayName, String value) throws XMPException
schemaNS
- The namespace URI for the array.
arrayName
- The name of the array. May be a general path expression, must not be null or the empty string.
value
- the value of the array item.
XMPException
- Wraps all errors and exceptions that may occur.
public void appendAlternateArrayItem(String schemaNS, String arrayName, String value) throws XMPException
schemaNS
- The namespace URI for the array.
arrayName
- The name of the array. May be a general path expression, must not be null or the empty string.
value
- the value of the array item.
XMPException
- Wraps all errors and exceptions that may occur.
public void serialize(OutputStream externalOutputStream) throws XMPException
IOException
XMPException
public void close() throws IOException
IOException
public void addDocInfoProperty(Object key, String value) throws XMPException
XMPException
Copyright © 1998–2017. All rights reserved.