Package nu.validator.htmlparser.io
Class Encoding
java.lang.Object
nu.validator.htmlparser.io.Encoding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Encodingprivate final booleanprivate static String[]private final Stringprivate final Charsetprivate final booleanprivate static String[]private final booleanprivate static String[]private final booleanstatic final Encodingstatic final Encodingstatic final Encodingstatic final Encodingstatic final Encoding -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanasciiMapsToBasicLatin(byte[] testBuf, Charset cs) booleanstatic EncodingReturns the actualHtmlEncoding.Returns the canonName.booleanReturns the asciiSuperset.private static booleanisAsciiSupersetnessSensitive(int c) private static booleanbooleanReturns the likelyEbcdic.private static booleanisLikelyEbcdic(String canonName, boolean asciiSuperset) booleanReturns the obscure.private static booleanbooleanbooleanReturns the shouldNot.private static booleanisShouldNot(String lowerCasePreferredIanaName) static voidstatic StringtoAsciiLowerCase(String str) static String
-
Field Details
-
UTF8
-
UTF16
-
UTF16LE
-
UTF16BE
-
WINDOWS1252
-
SHOULD_NOT
-
BANNED
-
NOT_OBSCURE
-
encodingByCookedName
-
canonName
-
charset
-
asciiSuperset
private final boolean asciiSuperset -
obscure
private final boolean obscure -
shouldNot
private final boolean shouldNot -
likelyEbcdic
private final boolean likelyEbcdic -
actualHtmlEncoding
-
-
Constructor Details
-
Method Details
-
isAsciiSupersetnessSensitive
private static boolean isAsciiSupersetnessSensitive(int c) -
isObscure
-
isBanned
-
isShouldNot
-
asciiMapsToBasicLatin
- Parameters:
testBuf-cs-
-
isLikelyEbcdic
-
forName
-
toNameKey
-
toAsciiLowerCase
-
isAsciiSuperset
public boolean isAsciiSuperset()Returns the asciiSuperset.- Returns:
- the asciiSuperset
-
getCanonName
Returns the canonName.- Returns:
- the canonName
-
isLikelyEbcdic
public boolean isLikelyEbcdic()Returns the likelyEbcdic.- Returns:
- the likelyEbcdic
-
isObscure
public boolean isObscure()Returns the obscure.- Returns:
- the obscure
-
isShouldNot
public boolean isShouldNot()Returns the shouldNot.- Returns:
- the shouldNot
-
isRegistered
public boolean isRegistered() -
canEncode
public boolean canEncode()- Returns:
- See Also:
-
newDecoder
- Returns:
- See Also:
-
newEncoder
- Returns:
- See Also:
-
getActualHtmlEncoding
Returns the actualHtmlEncoding.- Returns:
- the actualHtmlEncoding
-
main
-