|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.beetstra.jutf7.Base64Util
class Base64Util
Represent a base 64 mapping. The 64 characters used in the encoding can be specified, since modified-UTF-7 uses other characters than UTF-7 (',' instead of '/').
The exact type of the arguments and result values is adapted to the needs of the encoder and decoder, as opposed to following a strict interpretation of base 64.
Base 64, as specified in RFC 2045, is an encoding used to encode bytes as characters. In (modified-)UTF-7 however, it is used to encode characters as bytes, using some intermediate steps:
Constructor Summary | |
---|---|
Base64Util(String alphabet)
Initializes the class with the specified encoding/decoding alphabet. |
Method Summary | |
---|---|
(package private) boolean |
contains(char ch)
Tells whether the alphabet contains the specified character. |
(package private) byte |
getChar(int sextet)
Encodes the six bit group as a character. |
(package private) int |
getSextet(byte ch)
Returns the integer value of the six bits represented by the specified character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Base64Util(String alphabet)
alphabet
-
IllegalArgumentException
- if alphabet is not 64 characters long or
contains characters which are not 7-bit ASCIIMethod Detail |
---|
int getSextet(byte ch)
ch
- The character, as a ASCII encoded byte
boolean contains(char ch)
ch
- The character
ch
, false otherwisebyte getChar(int sextet)
sextet
- The six bit group to be encoded
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |