org.apache.fop.afp.fonts

## Class CharactersetEncoder

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

-     public abstract class CharactersetEncoder
      extends java.lang.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(java.lang.CharSequence chars, java.lang.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(java.lang.CharSequence chars,
                                                                    java.lang.String encoding)
                                                             throws java.nio.charset.CharacterCodingException

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

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