net.sf.okapi.common.encoder

## Class MarkdownEncoder

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

- All Implemented Interfaces:
    IEncoder

      public class MarkdownEncoder
      extends DefaultEncoder

  The Markdown filter handles newlines itself, so encoder is a no-op.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MarkdownEncoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `encode(char value, EncoderContext context)` Encodes a given character with this encoding.
    `java.lang.String` | `encode(int value, EncoderContext context)` Encodes a given code-point with this encoding.
    `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

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

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

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

- - ### Constructor Detail

    - #### MarkdownEncoder

          public MarkdownEncoder()

  - ### 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.

    - #### encode

          public java.lang.String encode(char value,
                                EncoderContext context)

      Description copied from interface: `IEncoder`
      Encodes a given character with this encoding.
      Specified by:
        `encode` in interface `IEncoder`
      Overrides:
        `encode` in class `DefaultEncoder`
      Parameters:
        `value` - the character to encode.
        `context` - the context of the character: 0=text, 1=skeleton, 2=inline.
      Returns:
        the encoded character 9as a string since it can be now made up of more than one character).

    - #### encode

          public java.lang.String encode(int value,
                                EncoderContext context)

      Description copied from interface: `IEncoder`
      Encodes a given code-point with this encoding. If this method is called from a loop it is assumed that the code point is tested by the caller to know if it is a supplemental one or not and and any index update to skip the low surrogate part of the pair is done on the caller side.
      Specified by:
        `encode` in interface `IEncoder`
      Overrides:
        `encode` in class `DefaultEncoder`
      Parameters:
        `value` - the code-point to encode.
        `context` - the context of the character: 0=text, 1=skeleton, 2=inline.
      Returns:
        the encoded character (as a string since it can be now made up of more than one character).