public class HTMLEntityCodec extends AbstractIntegerCodec
| 构造器和说明 |
|---|
HTMLEntityCodec() |
| 限定符和类型 | 方法和说明 |
|---|---|
Integer |
decodeCharacter(PushbackSequence<Integer> input)
Returns the decoded version of the next character from the input string and
advances the current character in the PushbackSequence.
|
String |
encode(char[] immune,
String input)
Given an array of
char, scan the input String and encode
unsafe codePoints, except for codePoints passed into the char array. |
String |
encodeCharacter(char[] immune,
int codePoint)
Default codepoint implementation that should be overridden in specific
codecs.
|
decodecontainsCharacter, encodeCharacter, encodeCharacter, getHexForNonAlphanumeric, getHexForNonAlphanumeric, toHex, toHex, toOctalpublic String encode(char[] immune, String input)
char, scan the input String and encode
unsafe codePoints, except for codePoints passed into the char array.
Character.isValidCodePoint( int ) method.
WARNING!! Character based Codecs will silently transform code points
that are not legal UTF code points into garbage data as they will cast them
to chars.
If you are implementing an Integer based codec, these will be
silently discarded based on the return from
Character.isValidCodePoint( int ). This is the preferred behavior
moving forward.
Encode a String so that it can be safely used in a specific context.public String encodeCharacter(char[] immune, int codePoint)
encodeCharacter 在接口中 Codec<Integer>encodeCharacter 在类中 AbstractCodec<Integer>immune - codePoint - the integer to encodepublic Integer decodeCharacter(PushbackSequence<Integer> input)
decodeCharacter 在接口中 Codec<Integer>decodeCharacter 在类中 AbstractCodec<Integer>input - the Character to decodeCopyright © 2023. All rights reserved.