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

org.apache.fop.afp.parser

## Class UnparsedStructuredField

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

-     public final class UnparsedStructuredField
      extends Object

  Represents an unparsed (generic) AFP structured field.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getCompleteFieldAsBytes()` Returns the complete structured field as a byte array.
    `byte[]` | `getData()` Returns the structured field's payload.
    `short` | `getExtLength()` Returns the length of the extension if present.
    `byte` | `getSfCategoryCode()` Returns the structured field's category code.
    `byte` | `getSfClassCode()` Returns the structured field's class code.
    `short` | `getSfLength()` Returns the structured field's length.
    `byte` | `getSfTypeCode()` Returns the structured field's type code.
    `int` | `getSfTypeID()` Returns the structured field's identifier.
    `boolean` | `isSfiExtensionPresent()` Indicates whether an field introducer extension is present.
    `boolean` | `isSfiPaddingPresent()` Indicates whether the data is padded.
    `boolean` | `isSfiSegmentedData()` Indicates whether segmented data is present.
    `String` | `toString()`
    `void` | `writeTo(OutputStream out)` Writes this structured field to the given `OutputStream`.

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

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

- - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getSfLength

          public short getSfLength()

      Returns the structured field's length.
      Returns:
        the field length

    - #### getSfTypeID

          public int getSfTypeID()

      Returns the structured field's identifier.
      Returns:
        the field identifier

    - #### getSfClassCode

          public byte getSfClassCode()

      Returns the structured field's class code.
      Returns:
        the field class code

    - #### getSfTypeCode

          public byte getSfTypeCode()

      Returns the structured field's type code.
      Returns:
        the type code

    - #### getSfCategoryCode

          public byte getSfCategoryCode()

      Returns the structured field's category code.
      Returns:
        the sfCategoryCode

    - #### isSfiExtensionPresent

          public boolean isSfiExtensionPresent()

      Indicates whether an field introducer extension is present.
      Returns:
        true if an field introducer extension is present

    - #### isSfiSegmentedData

          public boolean isSfiSegmentedData()

      Indicates whether segmented data is present.
      Returns:
        true if the data is segmented

    - #### isSfiPaddingPresent

          public boolean isSfiPaddingPresent()

      Indicates whether the data is padded.
      Returns:
        true if the data is padded

    - #### getExtLength

          public short getExtLength()

      Returns the length of the extension if present.
      Returns:
        the length of the extension (or 0 if no extension is present)

    - #### getData

          public byte[] getData()

      Returns the structured field's payload.
      Returns:
        the field's data

    - #### getCompleteFieldAsBytes

          public byte[] getCompleteFieldAsBytes()

      Returns the complete structured field as a byte array.
      Returns:
        the complete field data

    - #### writeTo

          public void writeTo(OutputStream out)
                       throws IOException

      Writes this structured field to the given `OutputStream`.
      Parameters:
        `out` - the output stream
      Throws:
        `IOException` - if an I/O error occurs

Copyright © 2025 Apache Software Foundation. All rights reserved.