waba.sys
Class CharacterConverter

java.lang.Object
  |
  +--waba.sys.CharacterConverter
Direct Known Subclasses:
BigByteArrayStream.DirectCharConverter, UTF8CharacterConverter

public class CharacterConverter
extends java.lang.Object

This class is used to correctly handle international character convertions. The default character scheme converter is the 8859-1. If you want to use a different one, you must extend this class, implementing the bytes2chars and chars2bytes methods, and then assign the public member of waba.sys.Convert.charConverter to use your class instead of this default one. You can also use the method Convert.setDefaultConverter to change it, passing, as parameter, the prefix of your CharacterConverter class (better look at the implementation to know what to pass on).

To find out which sun.io.CharacterEncoder you're using, do:

System.out.println(""+sun.io.ByteToCharConverter.getDefault());


Constructor Summary
CharacterConverter()
           
 
Method Summary
 char[] bytes2chars(byte[] bytes, int offset, int length)
           
 byte[] chars2bytes(char[] chars, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterConverter

public CharacterConverter()
Method Detail

bytes2chars

public char[] bytes2chars(byte[] bytes,
                          int offset,
                          int length)

chars2bytes

public byte[] chars2bytes(char[] chars,
                          int offset,
                          int length)