|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.afp.util.AFPResourceUtil
public final class AFPResourceUtil
TODO better docs
Utility for AFP resource handling
A utility class to read structured fields from a MO:DCA document. Each
component of a mixed object document is explicitly defined and delimited
in the data. This is accomplished through the use of MO:DCA data structures,
called structured fields. Structured fields are used to envelop document
components and to provide commands and information to applications using
the data. Structured fields may contain one or more parameters. Each
parameter provides one value from a set of values defined by the architecture.
MO:DCA structured fields consist of two parts: an introducer that identifies
the length and type of the structured field, and data that provides the
structured field's effect. The data is contained in a set of parameters,
which can consist of other data structures and data elements. The maximum
length of a structured field is 32767 bytes.
Method Summary | |
---|---|
static void |
copyNamedResource(java.lang.String name,
java.io.InputStream in,
java.io.OutputStream out)
Copy a named resource to a given OutputStream . |
static void |
copyResourceFile(java.io.InputStream in,
java.io.OutputStream out)
Copy a complete resource file to a given OutputStream . |
static byte[] |
getNext(byte[] identifier,
java.io.InputStream inputStream)
Get the next structured field as identified by the identifier parameter (this must be a valid MO:DCA structured field). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] getNext(byte[] identifier, java.io.InputStream inputStream) throws java.io.IOException
identifier
- the three byte identifierinputStream
- the inputStream
java.io.IOException
- if an I/O exception occurredpublic static void copyResourceFile(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
OutputStream
.
in
- external resource inputout
- output destination
java.io.IOException
- if an I/O error occurspublic static void copyNamedResource(java.lang.String name, java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
OutputStream
. The MO:DCA fields read from the
InputStream
are scanned for the resource with the given name.
name
- name of structured fieldin
- external resource inputout
- output destination
java.io.IOException
- if an I/O error occurs
|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |