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

org.apache.fop.afp.parser

## Class MODCAParser

- java.lang.Object
- - org.apache.fop.afp.parser.MODCAParser

-     public class MODCAParser
      extends Object

  An simple MO:DCA/AFP parser.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static byte` | `CARRIAGE_CONTROL_CHAR` The carriage control character (0x5A) used to indicate the start of a structured field.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MODCAParser(InputStream in)` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `UnparsedStructuredField` | `readNextStructuredField()` Reads the next structured field from the input stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CARRIAGE_CONTROL_CHAR

          public static final byte CARRIAGE_CONTROL_CHAR

      The carriage control character (0x5A) used to indicate the start of a structured field.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MODCAParser

          public MODCAParser(InputStream in)

      Main constructor
      Parameters:
        `in` - the `InputStream` to read the AFP file from.

  - ### Method Detail

    - #### readNextStructuredField

          public UnparsedStructuredField readNextStructuredField()
                                                          throws IOException

      Reads the next structured field from the input stream.

      No structure validation of the MO:DCA file is performed.

      Returns:
        a new unparsed structured field (or null when parsing is finished).
      Throws:
        `IOException` - if an I/O error occurs

Copyright © 2025 Apache Software Foundation. All rights reserved.