com.ibm.as400.access

Class Converter

  • java.lang.Object
    • com.ibm.as400.access.Converter
  • All Implemented Interfaces:
    java.io.Serializable


    public class Converter
    extends java.lang.Object
    implements java.io.Serializable
    A character set converter between Java String objects
    See Also:
    Serialized Form
    • Field Detail

      • impl

        public transient com.ibm.as400.access.ConverterImpl impl
    • Constructor Detail

      • Converter

        public Converter()
      • Converter

        public Converter(java.lang.String encoding)
                  throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • Converter

        public Converter(int ccsid)
                  throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • Converter

        public Converter(int ccsid,
                 AS400 system)
                  throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
    • Method Detail

      • byteArrayToString

        public java.lang.String byteArrayToString(byte[] source)
      • byteArrayToString

        public java.lang.String byteArrayToString(byte[] source,
                                         int offset)
      • byteArrayToString

        public java.lang.String byteArrayToString(byte[] source,
                                         int offset,
                                         int length)
      • getCcsid

        public int getCcsid()
      • getEncoding

        public java.lang.String getEncoding()
      • stringToByteArray

        public byte[] stringToByteArray(java.lang.String source)
      • stringToByteArray

        public void stringToByteArray(java.lang.String source,
                             byte[] destination)
                               throws java.io.CharConversionException
        Throws:
        java.io.CharConversionException
      • stringToByteArray

        public void stringToByteArray(java.lang.String source,
                             byte[] destination,
                             int offset)
                               throws java.io.CharConversionException
        Throws:
        java.io.CharConversionException
      • stringToByteArray

        public void stringToByteArray(java.lang.String source,
                             byte[] destination,
                             int offset,
                             int length)
                               throws java.io.CharConversionException
        Throws:
        java.io.CharConversionException
      • charArrayToByteArray

        public byte[] charArrayToByteArray(char[] source)
      • charArrayToByteArray

        public void charArrayToByteArray(char[] source,
                                byte[] destination)
                                  throws java.io.CharConversionException
        Throws:
        java.io.CharConversionException
      • charArrayToByteArray

        public void charArrayToByteArray(char[] source,
                                byte[] destination,
                                int offset)
                                  throws java.io.CharConversionException
        Throws:
        java.io.CharConversionException
      • charArrayToByteArray

        public void charArrayToByteArray(char[] source,
                                byte[] destination,
                                int offset,
                                int length)
                                  throws java.io.CharConversionException
        Throws:
        java.io.CharConversionException
      • byteArrayToCharArray

        public char[] byteArrayToCharArray(byte[] source,
                                  int offset,
                                  int length)