Documentation of 'org.apache.derby.client.net.Utf8CcsidManager' Java class
Utf8CcsidManager
org.apache.derby.client.net

Class Utf8CcsidManager



  • public class Utf8CcsidManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      Utf8CcsidManager() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] convertFromJavaString(java.lang.String sourceString, Agent agent) 
      java.lang.String convertToJavaString(byte[] sourceBytes, int offset, int numToConvert)
      Offset and numToConvert are given in terms of bytes! Not characters!
      boolean encode(java.nio.CharBuffer src, java.nio.ByteBuffer dest, Agent agent)
      Encode the contents of a CharBuffer into a ByteBuffer.
      void startEncoding()
      Initialize this instance for encoding a new string.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Utf8CcsidManager

        public Utf8CcsidManager()
    • Method Detail

      • convertFromJavaString

        public byte[] convertFromJavaString(java.lang.String sourceString,
                                            Agent agent)
                                     throws SqlException
        Throws:
        SqlException
      • convertToJavaString

        public java.lang.String convertToJavaString(byte[] sourceBytes,
                                                    int offset,
                                                    int numToConvert)
        Offset and numToConvert are given in terms of bytes! Not characters!
      • encode

        public boolean encode(java.nio.CharBuffer src,
                              java.nio.ByteBuffer dest,
                              Agent agent)
                       throws SqlException
        Encode the contents of a CharBuffer into a ByteBuffer. The method will return true if all the characters were encoded and copied to the destination. If the receiving byte buffer is too small to hold the entire encoded representation of the character buffer, the method will return false. The caller should then allocate a larger byte buffer, copy the contents from the old byte buffer to the new one, and then call this method again to get the remaining characters encoded.
        Parameters:
        src - buffer holding the characters to encode
        dest - buffer receiving the encoded bytes
        agent - where to report errors
        Returns:
        true if all characters were encoded, false if the destination buffer is full and there still are more characters to encode
        Throws:
        SqlException - if the characters cannot be encoded using this CCSID manager's character encoding

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.