Class 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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method 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