wt.util.xml.io
Class Char3in4Encoder

java.lang.Object
  extended bywt.util.xml.io.Char3in4Encoder
All Implemented Interfaces:
CharacterEncoder

public class Char3in4Encoder
extends Object
implements CharacterEncoder

Encodes a byte array as printable characters by converting 24bits of 3*8bit characters to 24bits of 4*6bit printable characters. The result is returned in a String.

(This conforms to 3to4 encoding and decoding in RFC1421 and RFC1521).

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static char[] keyArray
           
private static char padChar
          equivalent to '='.
private static String RESOURCE
           
 
Constructor Summary
Char3in4Encoder()
           
 
Method Summary
 String encode(byte[] byteArray)
          encodes a byte array as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

keyArray

private static final char[] keyArray

padChar

private static final char padChar
equivalent to '='.

See Also:
Constant Field Values
Constructor Detail

Char3in4Encoder

public Char3in4Encoder()
Method Detail

encode

public String encode(byte[] byteArray)
encodes a byte array as a string.

Supported API: false

Specified by:
encode in interface CharacterEncoder
Parameters:
byteArray - the byte array to encode
Returns:
String