com.ibm.as400.access

Class ConvTable

  • java.lang.Object
    • com.ibm.as400.access.ConvTable
  • >
    • Method Detail

      • byteArrayToString

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

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

        public int getCcsid()
      • getEncoding

        public java.lang.String getEncoding()
      • getTable

        public static final ConvTable getTable(java.lang.String encoding)
                                        throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • getTable

        public static final ConvTable getTable(int ccsid,
                         AS400ImplRemote system)
                                        throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • stringToByteArray

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

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

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

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

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

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

        public int stringToByteArray(java.lang.String source,
                            byte[] buf,
                            int offset,
                            int length,
                            BidiConversionProperties properties)
                              throws java.io.CharConversionException
        Place the string into the specified buffer, beginning at offset for length. This returns the number of bytes that did not fit (i.e. number of bytes truncated).
        Parameters:
        source - String to convert
        buf - output buffer
        offset - offset in buffer to put information
        length - maximum number of bytes to add to the buffer
        properties - BidiConversionProperties
        Returns:
        number of bytes that were truncated
        Throws:
        java.io.CharConversionException - If a character conversion error occurs.
      • validateData

        public int validateData(byte[] buf,
                       int offset,
                       int length)
      • isMixedCCSID

        public static boolean isMixedCCSID(int ccsid)
        Determine if a CCSID is a mixed CCSID. Being mixed means that 1 unicode character may translate into 1 or many bytes.
        Parameters:
        ccsid - CCSID to be tested
        Returns:
        true if the CCSID is a mixed CCSID, otherwise returns false.