Package org.jcodings.specific
Class NonStrictUTF8Encoding
- java.lang.Object
-
- org.jcodings.Encoding
-
- org.jcodings.AbstractEncoding
-
- org.jcodings.MultiByteEncoding
-
- org.jcodings.unicode.UnicodeEncoding
-
- org.jcodings.specific.BaseUTF8Encoding
-
- org.jcodings.specific.NonStrictUTF8Encoding
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class NonStrictUTF8Encoding extends BaseUTF8Encoding
-
-
Field Summary
Fields Modifier and Type Field Description static NonStrictUTF8Encoding
INSTANCE
private static int[]
UTF8EncLen
-
Fields inherited from class org.jcodings.specific.BaseUTF8Encoding
USE_INVALID_CODE_SCHEME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NonStrictUTF8Encoding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isCodeCType(int code, int ctype)
Perform a check whether given code is of given character type (e.g.int
length(byte[] bytes, int p, int end)
Returns character length given stream, character position and stream end returns1
for singlebyte encodings or performs sanity validations for multibyte ones and returns the character length, missing characters in the stream otherwise-
Methods inherited from class org.jcodings.specific.BaseUTF8Encoding
codeToMbc, codeToMbcLength, ctypeCodeRange, getCharsetName, isNewLine, isReverseMatchAllowed, leftAdjustCharHead, mbcCaseFold, mbcToCode, trail0, trailS
-
Methods inherited from class org.jcodings.unicode.UnicodeEncoding
applyAllCaseFold, caseFoldCodesByString, caseMap, ctypeCodeRange, isInCodeRange, propertyNameToCType
-
Methods inherited from class org.jcodings.MultiByteEncoding
isInRange, length, lengthForTwoUptoFour, mb2CodeToMbc, mb2CodeToMbcLength, mb2IsCodeCType, mb4CodeToMbc, mb4CodeToMbcLength, mb4IsCodeCType, mbnMbcCaseFold, mbnMbcToCode, missing, missing, safeLengthForUptoFour, safeLengthForUptoThree, safeLengthForUptoTwo, strCodeAt, strLength
-
Methods inherited from class org.jcodings.AbstractEncoding
asciiApplyAllCaseFold, asciiCaseFoldCodesByString, asciiMbcCaseFold, isCodeCTypeInternal
-
Methods inherited from class org.jcodings.Encoding
asciiToLower, asciiToUpper, digitVal, equals, getCharset, getIndex, getName, hashCode, isAlnum, isAlpha, isAscii, isAscii, isAsciiCompatible, isBlank, isCntrl, isDigit, isDummy, isFixedWidth, isGraph, isLower, isMbcAscii, isMbcCrnl, isMbcHead, isMbcWord, isNewLine, isPrint, isPunct, isSbWord, isSingleByte, isSpace, isUnicode, isUpper, isUTF8, isWord, isWordGraphPrint, isXDigit, load, load, maxLength, maxLengthDistance, mbcodeStartPosition, minLength, odigitVal, prevCharHead, rightAdjustCharHead, rightAdjustCharHeadWithPrev, setDummy, setName, setName, step, stepBack, strByteLengthNull, strLengthNull, strNCmp, toLowerCaseTable, toString, xdigitVal
-
-
-
-
Field Detail
-
UTF8EncLen
private static final int[] UTF8EncLen
-
INSTANCE
public static final NonStrictUTF8Encoding INSTANCE
-
-
Method Detail
-
length
public int length(byte[] bytes, int p, int end)
Description copied from class:Encoding
Returns character length given stream, character position and stream end returns1
for singlebyte encodings or performs sanity validations for multibyte ones and returns the character length, missing characters in the stream otherwise
-
isCodeCType
public boolean isCodeCType(int code, int ctype)
Description copied from class:Encoding
Perform a check whether given code is of given character type (e.g. used by isWord(someByte) and similar methods)- Overrides:
isCodeCType
in classUnicodeEncoding
- Parameters:
code
- a code point of a characterctype
- a character type to check against Oniguruma equivalent:is_code_ctype
-
-