PdfAXmpWriter
public class XmpWriter
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected java.io.OutputStream |
outputStream |
|
protected SerializeOptions |
serializeOptions |
|
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 XMPMeta |
xmpMeta |
Constructor | Description |
---|---|
XmpWriter(java.io.OutputStream os) |
Creates an XmpWriter.
|
XmpWriter(java.io.OutputStream os,
PdfDictionary info) |
|
XmpWriter(java.io.OutputStream os,
java.lang.String utfEncoding,
int extraSpace) |
Creates an XmpWriter.
|
XmpWriter(java.io.OutputStream os,
java.util.Map<java.lang.String,java.lang.String> info) |
Modifier and Type | Method | Description |
---|---|---|
void |
addDocInfoProperty(java.lang.Object key,
java.lang.String value) |
|
void |
addRdfDescription(XmpSchema s) |
Deprecated.
|
void |
addRdfDescription(java.lang.String xmlns,
java.lang.String content) |
Deprecated.
|
void |
appendAlternateArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String value) |
Simplifies the construction of an alternate array by not requiring that you pre-create an empty array.
|
void |
appendArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String value) |
Simplifies the construction of an array by not requiring that you pre-create an empty array.
|
void |
appendOrderedArrayItem(java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.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(java.io.OutputStream externalOutputStream) |
Flushes and closes the XmpWriter.
|
void |
setAbout(java.lang.String about) |
|
void |
setProperty(java.lang.String schemaNS,
java.lang.String propName,
java.lang.Object value) |
|
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
protected XMPMeta xmpMeta
protected java.io.OutputStream outputStream
protected SerializeOptions serializeOptions
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<java.lang.String,java.lang.String> info) throws java.io.IOException
os
- info
- java.io.IOException
public XMPMeta getXmpMeta()
public void setReadOnly()
public void setAbout(java.lang.String about)
about
- The about to set.@Deprecated public void addRdfDescription(java.lang.String xmlns, java.lang.String content) throws java.io.IOException
xmlns
- content
- java.io.IOException
@Deprecated public void addRdfDescription(XmpSchema s) throws java.io.IOException
s
- java.io.IOException
public void setProperty(java.lang.String schemaNS, java.lang.String propName, java.lang.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(java.lang.String schemaNS, java.lang.String arrayName, java.lang.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(java.lang.String schemaNS, java.lang.String arrayName, java.lang.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(java.lang.String schemaNS, java.lang.String arrayName, java.lang.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(java.io.OutputStream externalOutputStream) throws XMPException
java.io.IOException
XMPException
public void close() throws java.io.IOException
java.io.IOException
public void addDocInfoProperty(java.lang.Object key, java.lang.String value) throws XMPException
XMPException
Copyright © 1998–2018. All rights reserved.