wt.util.xml.io
Class Char3in4Decoder

java.lang.Object
  extended bywt.util.xml.io.Char3in4Decoder
All Implemented Interfaces:
CharacterDecoder

public class Char3in4Decoder
extends Object
implements CharacterDecoder

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

(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 byte[] keyByteArray
           
private static char padChar
          equivalent to '='.
private static String RESOURCE
           
 
Constructor Summary
Char3in4Decoder()
           
 
Method Summary
 byte[] decode(byte[] byteArray)
          decodes a coded string's byte array to an uncoded byte array.
 byte[] decode(String codedString)
          decodes a string to a byte array.
 
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

keyByteArray

private static final byte[] keyByteArray

padChar

private static final char padChar
equivalent to '='.

See Also:
Constant Field Values
Constructor Detail

Char3in4Decoder

public Char3in4Decoder()
Method Detail

decode

public byte[] decode(byte[] byteArray)
              throws XMLMechanismException
decodes a coded string's byte array to an uncoded byte array.

Supported API: false

Parameters:
byteArray - the byte array to decode
Returns:
byte[]
Throws:
XMLMechanismException

decode

public byte[] decode(String codedString)
              throws XMLMechanismException
decodes a string to a byte array.

Supported API: false

Specified by:
decode in interface CharacterDecoder
Parameters:
codedString - the byte array to encode
Returns:
byte[]
Throws:
XMLMechanismException