org.apache.fop.afp.fonts

## Class CharactersetEncoder

- java.lang.Object
- - org.apache.fop.afp.fonts.CharactersetEncoder

-     public abstract class CharactersetEncoder
      extends Object

  An abstraction that wraps the encoding mechanism for encoding a Unicode character sequence into a specified format.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CharactersetEncoder.EncodedChars` A container for encoded character bytes

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CharactersetEncoder.EncodedChars` | `encodeSBCS(CharSequence chars, String encoding)` Encodes `chars` into a format specified by `encoding`.

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

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

- - ### Method Detail

    - #### encodeSBCS

          public static CharactersetEncoder.EncodedChars encodeSBCS(CharSequence chars,
                                                                    String encoding)
                                                             throws CharacterCodingException

      Encodes `chars` into a format specified by `encoding`.
      Parameters:
        `chars` - the character sequence
        `encoding` - the encoding type
      Returns:
        encoded data
      Throws:
        `CharacterCodingException` - if encoding fails

Copyright © 2023 Apache Software Foundation. All rights reserved.