org.apache.fop.afp.modca

## Class PresentationTextData

- java.lang.Object
- - org.apache.fop.afp.modca.AbstractAFPObject
  - - org.apache.fop.afp.modca.PresentationTextData

- All Implemented Interfaces:
    PtocaConstants, Streamable

      public class PresentationTextData
      extends AbstractAFPObject
      implements PtocaConstants

  Presentation text data contains the graphic characters and the control sequences necessary to position the characters within the object space. The data consists of: - graphic characters to be presented - control sequences that position them - modal control sequences that adjust the positions by small amounts - other functions causing text to be presented with differences in appearance.

  The graphic characters are expected to conform to a coded font representation so that they can be translated from the code point in the object data to the character in the coded font. The units of measure for linear displacements are derived from the PresentationTextDescriptor or from the hierarchical defaults.

  In addition to graphic character code points, Presentation Text data can contain embedded control sequences. These are strings of two or more bytes which signal an alternate mode of processing for the content of the current Presentation Text data.

  The content for this object can be created using `PtocaBuilder`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `AbstractAFPObject.Category, AbstractAFPObject.Type`

  - ### Field Summary

    - ### Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `LOG, SF_CLASS, SF_HEADER_LENGTH`

    - ### Fields inherited from interface org.apache.fop.afp.ptoca.PtocaConstants

      `AMB, AMI, CHAIN_BIT, DBR, DIR, ESCAPE, NOP, RMI, SCFL, SEC, SIA, STO, SVI, TRANSPARENT_DATA_MAX_SIZE, TRN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PresentationTextData()` Default constructor for the PresentationTextData.
    `PresentationTextData(boolean controlInd)` Constructor for the PresentationTextData, the boolean flag indicate whether the control sequence prefix should be set to indicate the start of a new control sequence.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBytesAvailable()` Returns the number of data bytes still available in this object until it is full and a new one has to be started.
    `protected java.io.OutputStream` | `getOutputStream()` Returns the output stream the content data is written to.
    `void` | `writeToStream(java.io.OutputStream os)` DataStream objects must implement the writeToStream() method to write its data to the given OutputStream

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `copySF, copySF, truncate, writeChunksToStream, writeObjects`

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

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

- - ### Constructor Detail

    - #### PresentationTextData

          public PresentationTextData()

      Default constructor for the PresentationTextData.

    - #### PresentationTextData

          public PresentationTextData(boolean controlInd)

      Constructor for the PresentationTextData, the boolean flag indicate whether the control sequence prefix should be set to indicate the start of a new control sequence.
      Parameters:
        `controlInd` - The control sequence indicator.

  - ### Method Detail

    - #### getBytesAvailable

          public int getBytesAvailable()

      Returns the number of data bytes still available in this object until it is full and a new one has to be started.
      Returns:
        the number of data bytes available

    - #### getOutputStream

          protected java.io.OutputStream getOutputStream()

      Returns the output stream the content data is written to.
      Returns:
        the output stream

    - #### writeToStream

          public void writeToStream(java.io.OutputStream os)
                             throws java.io.IOException

      DataStream objects must implement the writeToStream() method to write its data to the given OutputStream
      Specified by:
        `writeToStream` in interface `Streamable`
      Parameters:
        `os` - the outputsteam stream
      Throws:
        `java.io.IOException` - an I/O exception of some sort has occurred.

Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.