Package com.ibm.icu.charset
Class CharsetUTF7
- java.lang.Object
-
- java.nio.charset.Charset
-
- com.ibm.icu.charset.CharsetICU
-
- com.ibm.icu.charset.CharsetUTF7
-
- All Implemented Interfaces:
java.lang.Comparable<java.nio.charset.Charset>
class CharsetUTF7 extends CharsetICU
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
CharsetUTF7.CharsetDecoderUTF7
(package private) class
CharsetUTF7.CharsetEncoderUTF7
-
Field Summary
Fields Modifier and Type Field Description private static byte
AMPERSAND
private static byte
BACKSLASH
private static byte
COMMA
private static byte[]
ENCODE_DIRECTLY_MAXIMUM
private static byte[]
ENCODE_DIRECTLY_RESTRICTED
private static byte[]
FROM_BASE_64
protected byte[]
fromUSubstitution
private static java.lang.String
IMAP_NAME
private static byte
MINUS
private static byte
PLUS
private static byte
SLASH
private static byte[]
TO_BASE_64
private boolean
useIMAP
-
Fields inherited from class com.ibm.icu.charset.CharsetICU
codepage, conversionType, hasFromUnicodeFallback, hasToUnicodeFallback, icuCanonicalName, maxBytesPerChar, maxCharsPerByte, minBytesPerChar, name, options, platform, ROUNDTRIP_AND_FALLBACK_SET, ROUNDTRIP_SET, subChar, subChar1, subCharLen, unicodeMask
-
-
Constructor Summary
Constructors Constructor Description CharsetUTF7(java.lang.String icuCanonicalName, java.lang.String javaCanonicalName, java.lang.String[] aliases)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static byte
FROM_BASE64_IMAP(char c)
(package private) void
getUnicodeSetImpl(UnicodeSet setFillIn, int which)
This follows ucnv.c method ucnv_detectUnicodeSignature() to detect the start of the stream for example U+FEFF (the Unicode BOM/signature character) that can be ignored.private static boolean
inSetDIMAP(char c)
private static boolean
isCRLFTAB(char c)
private static boolean
isLegal(char c, boolean useIMAP)
java.nio.charset.CharsetDecoder
newDecoder()
java.nio.charset.CharsetEncoder
newEncoder()
private static byte
TO_BASE64_IMAP(int n)
-
Methods inherited from class com.ibm.icu.charset.CharsetICU
contains, forNameICU, getCharset, getCompleteUnicodeSet, getNonSurrogateUnicodeSet, getUnicodeSet, isFixedWidth, isSurrogate
-
-
-
-
Field Detail
-
IMAP_NAME
private static final java.lang.String IMAP_NAME
- See Also:
- Constant Field Values
-
useIMAP
private boolean useIMAP
-
fromUSubstitution
protected byte[] fromUSubstitution
-
PLUS
private static final byte PLUS
- See Also:
- Constant Field Values
-
MINUS
private static final byte MINUS
- See Also:
- Constant Field Values
-
BACKSLASH
private static final byte BACKSLASH
- See Also:
- Constant Field Values
-
AMPERSAND
private static final byte AMPERSAND
- See Also:
- Constant Field Values
-
COMMA
private static final byte COMMA
- See Also:
- Constant Field Values
-
SLASH
private static final byte SLASH
- See Also:
- Constant Field Values
-
ENCODE_DIRECTLY_MAXIMUM
private static final byte[] ENCODE_DIRECTLY_MAXIMUM
-
ENCODE_DIRECTLY_RESTRICTED
private static final byte[] ENCODE_DIRECTLY_RESTRICTED
-
TO_BASE_64
private static final byte[] TO_BASE_64
-
FROM_BASE_64
private static final byte[] FROM_BASE_64
-
-
Method Detail
-
isCRLFTAB
private static boolean isCRLFTAB(char c)
-
isLegal
private static boolean isLegal(char c, boolean useIMAP)
-
inSetDIMAP
private static boolean inSetDIMAP(char c)
-
TO_BASE64_IMAP
private static byte TO_BASE64_IMAP(int n)
-
FROM_BASE64_IMAP
private static byte FROM_BASE64_IMAP(char c)
-
newDecoder
public java.nio.charset.CharsetDecoder newDecoder()
- Specified by:
newDecoder
in classjava.nio.charset.Charset
-
newEncoder
public java.nio.charset.CharsetEncoder newEncoder()
- Specified by:
newEncoder
in classjava.nio.charset.Charset
-
getUnicodeSetImpl
void getUnicodeSetImpl(UnicodeSet setFillIn, int which)
Description copied from class:CharsetICU
This follows ucnv.c method ucnv_detectUnicodeSignature() to detect the start of the stream for example U+FEFF (the Unicode BOM/signature character) that can be ignored. Detects Unicode signature byte sequences at the start of the byte stream and returns number of bytes of the BOM of the indicated Unicode charset. 0 is returned when no Unicode signature is recognized.- Specified by:
getUnicodeSetImpl
in classCharsetICU
-
-