abstract class CcsidManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) byte |
dot_ |
(package private) byte[] |
numToCharRepresentation_ |
(package private) byte[] |
numToSnaRequiredCrrtknChar_ |
(package private) byte |
space_ |
(package private) static int |
UTF8_CCSID |
Constructor and Description |
---|
CcsidManager(byte space,
byte dot,
byte[] numToCharRepresentation,
byte[] numToSnaRequiredCrrtknChar) |
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
convertFromJavaString(java.lang.String sourceString,
Agent agent) |
(package private) abstract java.lang.String |
convertToJavaString(byte[] sourceBytes,
int offset,
int numToConvert) |
abstract boolean |
encode(java.nio.CharBuffer src,
java.nio.ByteBuffer dest,
Agent agent)
Encode the contents of a
CharBuffer into a ByteBuffer . |
abstract void |
startEncoding()
Initialize this instance for encoding a new string.
|
byte space_
byte dot_
byte[] numToCharRepresentation_
byte[] numToSnaRequiredCrrtknChar_
static final int UTF8_CCSID
CcsidManager(byte space, byte dot, byte[] numToCharRepresentation, byte[] numToSnaRequiredCrrtknChar)
public abstract byte[] convertFromJavaString(java.lang.String sourceString, Agent agent) throws SqlException
SqlException
abstract java.lang.String convertToJavaString(byte[] sourceBytes, int offset, int numToConvert)
public abstract void startEncoding()
encode(java.nio.CharBuffer, java.nio.ByteBuffer, org.apache.derby.client.am.Agent)
on this instance. For example, it may reset the
internal java.nio.charset.CharsetEncoder
, if the implementation
uses one to do the encoding.public abstract boolean encode(java.nio.CharBuffer src, java.nio.ByteBuffer dest, Agent agent) throws SqlException
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.src
- buffer holding the characters to encodedest
- buffer receiving the encoded bytesagent
- where to report errorstrue
if all characters were encoded, false
if
the destination buffer is full and there still are more characters to
encodeSqlException
- if the characters cannot be encoded using this
CCSID manager's character encodingApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.