org.mozilla.jss.asn1
Class UniversalString.UniversalConverter

java.lang.Object
  |
  +--org.mozilla.jss.asn1.UniversalString.UniversalConverter
All Implemented Interfaces:
CharConverter
Enclosing class:
UniversalString

private static class UniversalString.UniversalConverter
extends java.lang.Object
implements CharConverter

A class for converting between Unicode and UCS4.


Field Summary
static int HALF_MASK
           
static int HALF_SHIFT
           
static int MAX_UNICODE
           
static int MAX_UTF16
           
static char REPLACEMENT_CHAR
           
static int UTF16_BASE
           
static int UTF16_HIGH_END
           
static int UTF16_HIGH_START
           
static int UTF16_LOW_END
           
static int UTF16_LOW_START
           
 
Constructor Summary
private UniversalString.UniversalConverter()
           
 
Method Summary
 char[] byteToChar(byte[] bytes, int offset, int len)
          Turns big-endian UCS4 characters into Unicode Java characters
 byte[] charToByte(char[] chars, int offset, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_UNICODE

public static final int MAX_UNICODE
See Also:
Constant Field Values

MAX_UTF16

public static final int MAX_UTF16
See Also:
Constant Field Values

REPLACEMENT_CHAR

public static final char REPLACEMENT_CHAR
See Also:
Constant Field Values

UTF16_BASE

public static final int UTF16_BASE
See Also:
Constant Field Values

HALF_SHIFT

public static final int HALF_SHIFT
See Also:
Constant Field Values

HALF_MASK

public static final int HALF_MASK
See Also:
Constant Field Values

UTF16_HIGH_START

public static final int UTF16_HIGH_START
See Also:
Constant Field Values

UTF16_HIGH_END

public static final int UTF16_HIGH_END
See Also:
Constant Field Values

UTF16_LOW_START

public static final int UTF16_LOW_START
See Also:
Constant Field Values

UTF16_LOW_END

public static final int UTF16_LOW_END
See Also:
Constant Field Values
Constructor Detail

UniversalString.UniversalConverter

private UniversalString.UniversalConverter()
Method Detail

byteToChar

public char[] byteToChar(byte[] bytes,
                         int offset,
                         int len)
                  throws java.io.CharConversionException
Turns big-endian UCS4 characters into Unicode Java characters

Specified by:
byteToChar in interface CharConverter
java.io.CharConversionException

charToByte

public byte[] charToByte(char[] chars,
                         int offset,
                         int len)
                  throws java.io.CharConversionException
Specified by:
charToByte in interface CharConverter
java.io.CharConversionException