gzz.util
Class UTF8Char

java.lang.Object
  |
  +--gzz.util.UTF8Char

public class UTF8Char
extends java.lang.Object


Field Summary
 byte[] b
           
 char c
           
static java.lang.String rcsid
           
 
Constructor Summary
UTF8Char(byte[] a)
          Create an UTF-8 char from the byte stream (bytes after the character are ignored).
UTF8Char(byte[] a, int start)
           
UTF8Char(char c)
           
 
Method Summary
static byte[] charToUTF8(char c)
          Convert a Java char into an UTF-8 octet stream.
 UTF8Char tryFromUTF8(byte[] a, int start)
           
static int UTF8Len(byte o)
          Find out the length of an UTF-8 sequence based on the first octet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcsid

public static final java.lang.String rcsid
See Also:
Constant Field Values

c

public char c

b

public byte[] b
Constructor Detail

UTF8Char

public UTF8Char(byte[] a)
         throws java.io.IOException
Create an UTF-8 char from the byte stream (bytes after the character are ignored). You can determine how many bytes was used by invoking UTF8Len on the created object.


UTF8Char

public UTF8Char(byte[] a,
                int start)
         throws java.io.IOException

UTF8Char

public UTF8Char(char c)
         throws java.io.IOException
Method Detail

charToUTF8

public static byte[] charToUTF8(char c)
                         throws java.io.IOException
Convert a Java char into an UTF-8 octet stream.

java.io.IOException

UTF8Len

public static int UTF8Len(byte o)
                   throws java.io.IOException
Find out the length of an UTF-8 sequence based on the first octet.

java.io.IOException

tryFromUTF8

public UTF8Char tryFromUTF8(byte[] a,
                            int start)
                     throws java.io.IOException
java.io.IOException