StructuredFieldReader (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.afp.util

## Class StructuredFieldReader

- java.lang.Object
- - org.apache.fop.afp.util.StructuredFieldReader

-     public class StructuredFieldReader
      extends Object

  A helper 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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StructuredFieldReader(InputStream inputStream)` The constructor for the StructuredFieldReader

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getNext(byte[] identifier)` 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`

- - ### Constructor Detail

    - #### StructuredFieldReader

          public StructuredFieldReader(InputStream inputStream)

      The constructor for the StructuredFieldReader
      Parameters:
        `inputStream` - the input stream to process

  - ### Method Detail

    - #### getNext

          public byte[] getNext(byte[] identifier)
                         throws IOException

      Get the next structured field as identified by the identifier parameter (this must be a valid MO:DCA structured field). Note: The returned data does not include the field length and identifier!
      Parameters:
        `identifier` - the three byte identifier
      Returns:
        the next structured field or null when there are no more
      Throws:
        `IOException` - if an I/O exception occurred

Copyright © 2025 Apache Software Foundation. All rights reserved.