java.lang.Object
org.jcodings.Encoding
org.jcodings.AbstractEncoding
org.jcodings.MultiByteEncoding
org.jcodings.CanBeTrailTableEncoding
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
BaseBIG5Encoding
,BaseSJISEncoding
,CP949Encoding
,GBKEncoding
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CanBeTrailTableEncoding
(String name, int minLength, int maxLength, int[] EncLen, int[][] Trans, short[] CTypeTable, boolean[] CanBeTrailTable) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isReverseMatchAllowed
(byte[] bytes, int p, int end) Returns true if it's safe to use reversal Boyer-Moore search fail fast algorithm Oniguruma equivalent:is_allowed_reverse_match
int
leftAdjustCharHead
(byte[] bytes, int p, int s, int end) Seeks the previous character head in a stream Oniguruma equivalent:left_adjust_char_head
Methods inherited from class org.jcodings.MultiByteEncoding
caseMap, 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
applyAllCaseFold, asciiApplyAllCaseFold, asciiCaseFoldCodesByString, asciiMbcCaseFold, asciiOnlyCaseMap, caseFoldCodesByString, isCodeCTypeInternal, isNewLine, mbcCaseFold, propertyNameToCType, singleByteAsciiOnlyCaseMap
Methods inherited from class org.jcodings.Encoding
asciiToLower, asciiToUpper, codeToMbc, codeToMbcLength, ctypeCodeRange, digitVal, equals, getCharset, getCharsetName, getIndex, getName, hashCode, isAlnum, isAlpha, isAscii, isAscii, isAsciiCompatible, isBlank, isCntrl, isCodeCType, isDigit, isDummy, isFixedWidth, isGraph, isLower, isMbcAscii, isMbcCrnl, isMbcHead, isMbcWord, isNewLine, isPrint, isPunct, isSbWord, isSingleByte, isSpace, isUnicode, isUpper, isUTF8, isWord, isWordGraphPrint, isXDigit, length, load, load, maxLength, maxLengthDistance, mbcodeStartPosition, mbcToCode, minLength, odigitVal, prevCharHead, replicate, rightAdjustCharHead, rightAdjustCharHeadWithPrev, setDummy, setName, setName, step, stepBack, strByteLengthNull, strLengthNull, strNCmp, toLowerCaseTable, toString, xdigitVal
-
Field Details
-
CanBeTrailTable
protected final boolean[] CanBeTrailTable
-
-
Constructor Details
-
CanBeTrailTableEncoding
protected CanBeTrailTableEncoding(String name, int minLength, int maxLength, int[] EncLen, int[][] Trans, short[] CTypeTable, boolean[] CanBeTrailTable)
-
-
Method Details
-
leftAdjustCharHead
public int leftAdjustCharHead(byte[] bytes, int p, int s, int end) Description copied from class:Encoding
Seeks the previous character head in a stream Oniguruma equivalent:left_adjust_char_head
- Specified by:
leftAdjustCharHead
in classEncoding
- Parameters:
bytes
- byte streamp
- positions
- stopend
- end
-
isReverseMatchAllowed
public boolean isReverseMatchAllowed(byte[] bytes, int p, int end) Description copied from class:Encoding
Returns true if it's safe to use reversal Boyer-Moore search fail fast algorithm Oniguruma equivalent:is_allowed_reverse_match
- Specified by:
isReverseMatchAllowed
in classEncoding
-