| java.lang.Object org.apache.cocoon.components.serializers.encoding.AbstractCharset org.apache.cocoon.components.serializers.encoding.CompiledCharset
All known Subclasses: org.apache.cocoon.components.serializers.encoding.cs_IBM424, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1123, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1254, org.apache.cocoon.components.serializers.encoding.cs_X_IBM942, org.apache.cocoon.components.serializers.encoding.cs_X_MACSYMBOL, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_8, org.apache.cocoon.components.serializers.encoding.cs_IBM_THAI, org.apache.cocoon.components.serializers.encoding.cs_JIS0208, org.apache.cocoon.components.serializers.encoding.cs_MACICELAND, org.apache.cocoon.components.serializers.encoding.cs_X_IBM943, org.apache.cocoon.components.serializers.encoding.cs_EUC_JP_LINUX, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1255, org.apache.cocoon.components.serializers.encoding.cs_IBM280, org.apache.cocoon.components.serializers.encoding.cs_ISO_2022_CN_GB, org.apache.cocoon.components.serializers.encoding.cs_X_IBM943C, org.apache.cocoon.components.serializers.encoding.cs_JIS0212, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1251, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1250, org.apache.cocoon.components.serializers.encoding.cs_MACUKRAINE, org.apache.cocoon.components.serializers.encoding.cs_EUC_KR, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1124, org.apache.cocoon.components.serializers.encoding.cs_IBM01140, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_3, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_31J, org.apache.cocoon.components.serializers.encoding.cs_IBM868, org.apache.cocoon.components.serializers.encoding.cs_X_IBM964, org.apache.cocoon.components.serializers.encoding.cs_X_IBM874, org.apache.cocoon.components.serializers.encoding.cs_IBM857, org.apache.cocoon.components.serializers.encoding.cs_IBM861, org.apache.cocoon.components.serializers.encoding.cs_IBM871, org.apache.cocoon.components.serializers.encoding.cs_X_IBM949C, org.apache.cocoon.components.serializers.encoding.cs_IBM01142, org.apache.cocoon.components.serializers.encoding.cs_X_MACHEBREW, org.apache.cocoon.components.serializers.encoding.cs_X_IBM937, org.apache.cocoon.components.serializers.encoding.cs_IBM862, org.apache.cocoon.components.serializers.encoding.cs_MACROMANIA, org.apache.cocoon.components.serializers.encoding.cs_IBM852, org.apache.cocoon.components.serializers.encoding.cs_X_IBM942C, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_2, org.apache.cocoon.components.serializers.encoding.cs_IBM437, org.apache.cocoon.components.serializers.encoding.cs_X_MSWIN_936, org.apache.cocoon.components.serializers.encoding.cs_ISO_2022_KR, org.apache.cocoon.components.serializers.encoding.cs_JOHAB, org.apache.cocoon.components.serializers.encoding.cs_X_IBM856, org.apache.cocoon.components.serializers.encoding.cs_IBM01143, org.apache.cocoon.components.serializers.encoding.cs_X_EUC_TW, org.apache.cocoon.components.serializers.encoding.cs_UTF_16, org.apache.cocoon.components.serializers.encoding.cs_GB2312, org.apache.cocoon.components.serializers.encoding.cs_ISCII91, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1046, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_9, org.apache.cocoon.components.serializers.encoding.cs_GBK, org.apache.cocoon.components.serializers.encoding.cs_X_MACTURKISH, org.apache.cocoon.components.serializers.encoding.cs_IBM284, org.apache.cocoon.components.serializers.encoding.cs_IBM01146, org.apache.cocoon.components.serializers.encoding.cs_EUC_JP, org.apache.cocoon.components.serializers.encoding.cs_IBM1026, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1381, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_1, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1122, org.apache.cocoon.components.serializers.encoding.cs_X_IBM950, org.apache.cocoon.components.serializers.encoding.cs_X_IBM875, org.apache.cocoon.components.serializers.encoding.cs_X_EUC_JP_LINUX, org.apache.cocoon.components.serializers.encoding.cs_X_IBM939, org.apache.cocoon.components.serializers.encoding.cs_IBM273, org.apache.cocoon.components.serializers.encoding.cs_X_IBM970, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_13, org.apache.cocoon.components.serializers.encoding.cs_X_WINDOWS_874, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_950, org.apache.cocoon.components.serializers.encoding.cs_US_ASCII, org.apache.cocoon.components.serializers.encoding.cs_X_IBM948, org.apache.cocoon.components.serializers.encoding.cs_X_EUC_CN, org.apache.cocoon.components.serializers.encoding.cs_EUC_CN, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1025, org.apache.cocoon.components.serializers.encoding.cs_X_MACUKRAINE, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1097, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_7, org.apache.cocoon.components.serializers.encoding.cs_X_IBM33722, org.apache.cocoon.components.serializers.encoding.cs_X_ISO_2022_CN_CNS, org.apache.cocoon.components.serializers.encoding.cs_MACGREEK, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1257, org.apache.cocoon.components.serializers.encoding.cs_IBM1047, org.apache.cocoon.components.serializers.encoding.cs_IBM869, org.apache.cocoon.components.serializers.encoding.cs_SHIFT_JIS, org.apache.cocoon.components.serializers.encoding.cs_UTF_8, org.apache.cocoon.components.serializers.encoding.cs_BIG5_HKSCS, org.apache.cocoon.components.serializers.encoding.cs_X_IBM921, org.apache.cocoon.components.serializers.encoding.cs_MACCENTRALEUROPE, org.apache.cocoon.components.serializers.encoding.cs_JIS0201, org.apache.cocoon.components.serializers.encoding.cs_X_JOHAB, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_949, org.apache.cocoon.components.serializers.encoding.cs_MACCYRILLIC, org.apache.cocoon.components.serializers.encoding.cs_X_MACICELAND, org.apache.cocoon.components.serializers.encoding.cs_ISO_2022_JP, org.apache.cocoon.components.serializers.encoding.cs_X_MACROMANIA, org.apache.cocoon.components.serializers.encoding.cs_IBM863, org.apache.cocoon.components.serializers.encoding.cs_X_WINDOWS_949, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1256, org.apache.cocoon.components.serializers.encoding.cs_BIG5, org.apache.cocoon.components.serializers.encoding.cs_MACSYMBOL, org.apache.cocoon.components.serializers.encoding.Compiler, org.apache.cocoon.components.serializers.encoding.cs_MACCROATIAN, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_936, org.apache.cocoon.components.serializers.encoding.cs_IBM864, org.apache.cocoon.components.serializers.encoding.cs_MACHEBREW, org.apache.cocoon.components.serializers.encoding.cs_IBM860, org.apache.cocoon.components.serializers.encoding.cs_IBM01144, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1112, org.apache.cocoon.components.serializers.encoding.cs_IBM277, org.apache.cocoon.components.serializers.encoding.cs_X_MACCYRILLIC, org.apache.cocoon.components.serializers.encoding.cs_IBM918, org.apache.cocoon.components.serializers.encoding.cs_X_MS950_HKSCS, org.apache.cocoon.components.serializers.encoding.cs_X_IBM930, org.apache.cocoon.components.serializers.encoding.cs_IBM01148, org.apache.cocoon.components.serializers.encoding.cs_GB18030, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1006, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_4, org.apache.cocoon.components.serializers.encoding.cs_IBM01145, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_15, org.apache.cocoon.components.serializers.encoding.cs_X_IBM933, org.apache.cocoon.components.serializers.encoding.cs_IBM037, org.apache.cocoon.components.serializers.encoding.cs_UTF_16BE, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1252, org.apache.cocoon.components.serializers.encoding.cs_IBM870, org.apache.cocoon.components.serializers.encoding.cs_MACARABIC, org.apache.cocoon.components.serializers.encoding.cs_X_EUCJP_OPEN, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1253, org.apache.cocoon.components.serializers.encoding.cs_MACROMAN, org.apache.cocoon.components.serializers.encoding.cs_IBM855, org.apache.cocoon.components.serializers.encoding.cs_X_JIS0208, org.apache.cocoon.components.serializers.encoding.cs_X_MACTHAI, org.apache.cocoon.components.serializers.encoding.cs_MACTURKISH, org.apache.cocoon.components.serializers.encoding.cs_X_ISCII91, org.apache.cocoon.components.serializers.encoding.cs_JIS_X0212_1990, org.apache.cocoon.components.serializers.encoding.cs_X_MACDINGBAT, org.apache.cocoon.components.serializers.encoding.cs_X_MACCROATIAN, org.apache.cocoon.components.serializers.encoding.cs_X_MACGREEK, org.apache.cocoon.components.serializers.encoding.cs_UTF_16LE, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_6, org.apache.cocoon.components.serializers.encoding.cs_IBM865, org.apache.cocoon.components.serializers.encoding.cs_IBM850, org.apache.cocoon.components.serializers.encoding.cs_X_IBM935, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1098, org.apache.cocoon.components.serializers.encoding.cs_JIS_X0201, org.apache.cocoon.components.serializers.encoding.cs_IBM500, org.apache.cocoon.components.serializers.encoding.cs_X_IBM922, org.apache.cocoon.components.serializers.encoding.cs_IBM866, org.apache.cocoon.components.serializers.encoding.cs_X_MACARABIC, org.apache.cocoon.components.serializers.encoding.cs_KOI8_R, org.apache.cocoon.components.serializers.encoding.cs_X_ISO_8859_11, org.apache.cocoon.components.serializers.encoding.cs_X_MACCENTRALEUROPE, org.apache.cocoon.components.serializers.encoding.cs_X_BIG5_SOLARIS, org.apache.cocoon.components.serializers.encoding.cs_X_PCK, org.apache.cocoon.components.serializers.encoding.cs_IBM00858, org.apache.cocoon.components.serializers.encoding.cs_ISO_2022_CN_CNS, org.apache.cocoon.components.serializers.encoding.cs_X_IBM737, org.apache.cocoon.components.serializers.encoding.cs_X_IBM949, org.apache.cocoon.components.serializers.encoding.cs_X_IBM1383, org.apache.cocoon.components.serializers.encoding.cs_X_ISO_2022_CN_GB, org.apache.cocoon.components.serializers.encoding.cs_WINDOWS_1258, org.apache.cocoon.components.serializers.encoding.cs_MACDINGBAT, org.apache.cocoon.components.serializers.encoding.cs_IBM01147, org.apache.cocoon.components.serializers.encoding.cs_IBM285, org.apache.cocoon.components.serializers.encoding.cs_X_WINDOWS_950, org.apache.cocoon.components.serializers.encoding.cs_IBM775, org.apache.cocoon.components.serializers.encoding.cs_EUC_TW, org.apache.cocoon.components.serializers.encoding.CompiledEncoder, org.apache.cocoon.components.serializers.encoding.cs_IBM01149, org.apache.cocoon.components.serializers.encoding.cs_IBM01141, org.apache.cocoon.components.serializers.encoding.cs_IBM420, org.apache.cocoon.components.serializers.encoding.cs_IBM297, org.apache.cocoon.components.serializers.encoding.cs_TIS_620, org.apache.cocoon.components.serializers.encoding.cs_ISO_8859_5, org.apache.cocoon.components.serializers.encoding.cs_MACTHAI, org.apache.cocoon.components.serializers.encoding.cs_IBM278,
CompiledCharset | abstract public class CompiledCharset extends AbstractCharset (Code) | | author: Pier Fumagalli, February 2003 version: CVS $Id: CompiledCharset.java 433543 2006-08-22 06:22:54Z crossley $ |
Field Summary | |
protected byte | encoding The encoding table of this Charset . |
Method Summary | |
public boolean | allows(char c) Check if the specified character is representable by this specifiec
Charset instance. | final protected void | compile() Compile the encoding table of this CompiledCharset . | abstract protected boolean | compile(char c) Return true or false wether this encoding can encode the specified
character or not. |
encoding | protected byte encoding(Code) | | The encoding table of this Charset .
|
CompiledCharset | protected CompiledCharset(String name, String aliases)(Code) | | Create a new instance of this CompiledCharset .
After construction, the compile() method will have to
be called for proper operation of this Charset .
Parameters: name - This Charset name. Parameters: aliases - This Charset alias names. throws: NullPointerException - If one of the arguments is null. |
CompiledCharset | protected CompiledCharset(String name, String aliases, byte encoding) throws NullPointerException, IllegalArgumentException(Code) | | Create a new instance of this CompiledCharset .
The encodings table passed to this constructor needs to be 8192
bytes long, or (in other words), must contain exactly 65536 bits.
As in the Java Programming Language a char can assume
values between 0 (zero) and 65535 (inclusive), each bit in the specified
array refers to a specific char value.
When this specific bit is set to 1 (one or true) we assume that the
charset can encode the given character, while when the bit is
set to 0 (zero or false), the character cannot be represented using
this Charset .
For example, the US-ASCII Charset can represent
only Java characters between 0 (zero) and 255 (inclusive), therefore
the specified byte array will contain only 256 true bits.
To check if a character can be encoded by this Charset ,
given "c " as the character to verify, one
can write this simple formula:
((encoding[c >> 3] & (1 << (c & 0x07))) > 0)
If the result of this operation is 0 (zero) the bit was set to zero,
and therefore "c " cannot be represented in
this Charset , while if the result is greater than 0 (zero)
the character "c " can actually be represented
by this Charset
Parameters: name - This Charset name. Parameters: aliases - This Charset alias names. Parameters: encoding - This Charset encoding table as specifiedabove. throws: NullPointerException - If one of the arguments is null. throws: IllegalArgumentException - If the length of the encoding tableis not 8192 precisely. |
allows | public boolean allows(char c)(Code) | | Check if the specified character is representable by this specifiec
Charset instance.
|
compile | final protected void compile()(Code) | | Compile the encoding table of this CompiledCharset .
This method will invoke the compile(...) method for any
possible value of a Java character (65536 times, from 0, zero, to
65535 inclusive), building the encoding table of the characters this
Charset can successfully represent.
|
compile | abstract protected boolean compile(char c)(Code) | | Return true or false wether this encoding can encode the specified
character or not.
This method is equivalent to the allows(...) method, but
it will be called upon construction of the encoding table.
|
|
|