net.sf.okapi.common.encoder

## Class CDATAEncoder

- java.lang.Object
- - net.sf.okapi.common.encoder.DefaultEncoder
  - - net.sf.okapi.common.encoder.CDATAEncoder

- All Implemented Interfaces:
    IEncoder

      public class CDATAEncoder
      extends DefaultEncoder

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDATAEncoder()`
    `CDATAEncoder(java.lang.String encoding, java.lang.String lineBreak)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `encode(java.lang.String text, EncoderContext context)` Encodes a given text with this encoder.

    - ### Methods inherited from class net.sf.okapi.common.encoder.DefaultEncoder

      `encode, encode, getCharsetEncoder, getEncoding, getLineBreak, getParameters, setOptions, toNative`

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

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

- - ### Constructor Detail

    - #### CDATAEncoder

          public CDATAEncoder(java.lang.String encoding,
                      java.lang.String lineBreak)

    - #### CDATAEncoder

          public CDATAEncoder()

  - ### Method Detail

    - #### encode

          public java.lang.String encode(java.lang.String text,
                                EncoderContext context)

      Description copied from interface: `IEncoder`
      Encodes a given text with this encoder.
      Specified by:
        `encode` in interface `IEncoder`
      Overrides:
        `encode` in class `DefaultEncoder`
      Parameters:
        `text` - the text to encode.
        `context` - the context of the text: 0=text, 1=skeleton, 2=inline.
      Returns:
        the encoded text.