|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.nio.charset.Charset com.beetstra.jutf7.UTF7StyleCharset
abstract class UTF7StyleCharset
Abstract base class for UTF-7 style encoding and decoding.
Field Summary | |
---|---|
(package private) Base64Util |
base64
|
(package private) boolean |
strict
|
Constructor Summary | |
---|---|
protected |
UTF7StyleCharset(String canonicalName,
String[] aliases,
String alphabet,
boolean strict)
Besides the name and aliases, two additional parameters are required. |
Method Summary | |
---|---|
(package private) abstract boolean |
canEncodeDirectly(char ch)
Tells if a character can be encoded using simple (US-ASCII) encoding or requires base 64 encoding. |
boolean |
contains(Charset cs)
|
CharsetDecoder |
newDecoder()
|
CharsetEncoder |
newEncoder()
|
(package private) abstract byte |
shift()
Returns character used to switch to base 64 encoding. |
(package private) abstract byte |
unshift()
Returns character used to switch from base 64 encoding to simple encoding. |
Methods inherited from class java.nio.charset.Charset |
---|
aliases, availableCharsets, canEncode, compareTo, decode, defaultCharset, displayName, displayName, encode, encode, equals, forName, hashCode, isRegistered, isSupported, name, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
final boolean strict
Base64Util base64
Constructor Detail |
---|
protected UTF7StyleCharset(String canonicalName, String[] aliases, String alphabet, boolean strict)
Besides the name and aliases, two additional parameters are required. First the base 64 alphabet used; in modified UTF-7 a slightly different alphabet is used. Additionally, it should be specified if encoders and decoders should be strict about the interpretation of malformed encoded sequences. This is used since modified UTF-7 specifically disallows some constructs which are allowed (or not specifically disallowed) in UTF-7 (RFC 2152).
canonicalName
- The name as defined in java.nio.charset.Charsetaliases
- The aliases as defined in java.nio.charset.Charsetalphabet
- The base 64 alphabet usedstrict
- True if strict handling of sequences is requestedMethod Detail |
---|
public boolean contains(Charset cs)
contains
in class Charset
public CharsetDecoder newDecoder()
newDecoder
in class Charset
public CharsetEncoder newEncoder()
newEncoder
in class Charset
abstract boolean canEncodeDirectly(char ch)
ch
- The character
abstract byte shift()
abstract byte unshift()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |