com.beetstra.jutf7
Class UTF7Charset

java.lang.Object
  extended by java.nio.charset.Charset
      extended by com.beetstra.jutf7.UTF7StyleCharset
          extended by com.beetstra.jutf7.UTF7Charset
All Implemented Interfaces:
Comparable<Charset>

 class UTF7Charset
extends UTF7StyleCharset

The character set specified in RFC 2152. Two variants are supported using the encodeOptional constructor flag

Author:
Jaap Beetstra
See Also:
RFC 2152

Field Summary
(package private)  String directlyEncoded
           
 
Fields inherited from class com.beetstra.jutf7.UTF7StyleCharset
base64, strict
 
Constructor Summary
UTF7Charset(String name, String[] aliases, boolean includeOptional)
           
 
Method Summary
(package private)  boolean canEncodeDirectly(char ch)
          Tells if a character can be encoded using simple (US-ASCII) encoding or requires base 64 encoding.
(package private)  byte shift()
          Returns character used to switch to base 64 encoding.
(package private)  byte unshift()
          Returns character used to switch from base 64 encoding to simple encoding.
 
Methods inherited from class com.beetstra.jutf7.UTF7StyleCharset
contains, newDecoder, newEncoder
 
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

directlyEncoded

final String directlyEncoded
Constructor Detail

UTF7Charset

UTF7Charset(String name,
            String[] aliases,
            boolean includeOptional)
Method Detail

canEncodeDirectly

boolean canEncodeDirectly(char ch)
Description copied from class: UTF7StyleCharset
Tells if a character can be encoded using simple (US-ASCII) encoding or requires base 64 encoding.

Specified by:
canEncodeDirectly in class UTF7StyleCharset
Parameters:
ch - The character
Returns:
True if the character can be encoded directly, false otherwise

shift

byte shift()
Description copied from class: UTF7StyleCharset
Returns character used to switch to base 64 encoding.

Specified by:
shift in class UTF7StyleCharset
Returns:
The shift character

unshift

byte unshift()
Description copied from class: UTF7StyleCharset
Returns character used to switch from base 64 encoding to simple encoding.

Specified by:
unshift in class UTF7StyleCharset
Returns:
The unshift character


Copyright © 2008 sourceforge. All Rights Reserved.