Class FixedWidthUnicodeEncoding
java.lang.Object
org.graalvm.shadowed.org.jcodings.Encoding
org.graalvm.shadowed.org.jcodings.MultiByteEncoding
org.graalvm.shadowed.org.jcodings.unicode.UnicodeEncoding
org.graalvm.shadowed.org.jcodings.unicode.FixedWidthUnicodeEncoding
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
UTF32BEEncoding,UTF32LEEncoding
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidasciiApplyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg) protected final CaseFoldCodeItem[]asciiCaseFoldCodesByString(int flag, byte[] bytes, int p, int end) protected final intasciiMbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] lower) final intcodeToMbcLength(int code) Returns character length given a code point Oniguruma equivalent:code_to_mbclenfinal int[]ctypeCodeRange(int ctype, IntHolder sbOut) onigenc_utf16_32_get_ctype_code_rangeprotected final booleanisCodeCTypeInternal(int code, int ctype) ONIGENC_IS_XXXXXX_CODE_CTYPEbooleanisNewLine(byte[] bytes, int p, int end) onigenc_is_mbc_newline_0x0a / used also by multibyte encodingsfinal booleanisReverseMatchAllowed(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_matchfinal intleftAdjustCharHead(byte[] bytes, int p, int s, int end) Seeks the previous character head in a stream Oniguruma equivalent:left_adjust_char_headfinal intlength(byte c) Returns character length given character head returns1for singlebyte encodings or performs direct length table lookup for multibyte ones.intlength(byte[] bytes, int p, int e) Returns character length given stream, character position and stream end returns1for singlebyte encodings or performs sanity validations for multibyte ones and returns the character length, missing characters in the stream otherwisefinal intstrCodeAt(byte[] bytes, int p, int end, int index) final intstrLength(byte[] bytes, int p, int end) Methods inherited from class org.graalvm.shadowed.org.jcodings.unicode.UnicodeEncoding
applyAllCaseFold, caseFoldCodesByString, caseMap, ctypeCodeRange, getCharsetName, isCodeCType, isInCodeRange, mbcCaseFold, propertyNameToCTypeMethods inherited from class org.graalvm.shadowed.org.jcodings.MultiByteEncoding
isInRange, lengthForTwoUptoFour, mb2CodeToMbc, mb2CodeToMbcLength, mb2IsCodeCType, mb4CodeToMbc, mb4CodeToMbcLength, mb4IsCodeCType, mbnMbcCaseFold, mbnMbcToCode, missing, missing, safeLengthForUptoFour, safeLengthForUptoThree, safeLengthForUptoTwoMethods inherited from class org.graalvm.shadowed.org.jcodings.Encoding
asciiToLower, asciiToUpper, codeToMbc, 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, mbcToCode, minLength, odigitVal, prevCharHead, rightAdjustCharHead, rightAdjustCharHeadWithPrev, setDummy, setName, setName, step, stepBack, strByteLengthNull, strLengthNull, strNCmp, toLowerCaseTable, toString, xdigitVal
-
Field Details
-
shift
protected final int shift
-
-
Constructor Details
-
FixedWidthUnicodeEncoding
-
-
Method Details
-
length
public final int length(byte c) Description copied from class:EncodingReturns character length given character head returns1for singlebyte encodings or performs direct length table lookup for multibyte ones.- Overrides:
lengthin classMultiByteEncoding- Parameters:
c- Character head Oniguruma equivalent:mbc_enc_lenTo be deprecated very soon (use length(byte[]bytes, int p, int end) version)
-
length
public int length(byte[] bytes, int p, int e) Description copied from class:EncodingReturns character length given stream, character position and stream end returns1for singlebyte encodings or performs sanity validations for multibyte ones and returns the character length, missing characters in the stream otherwise -
strLength
public final int strLength(byte[] bytes, int p, int end) - Overrides:
strLengthin classMultiByteEncoding
-
strCodeAt
public final int strCodeAt(byte[] bytes, int p, int end, int index) - Overrides:
strCodeAtin classMultiByteEncoding
-
codeToMbcLength
public final int codeToMbcLength(int code) Description copied from class:EncodingReturns character length given a code point Oniguruma equivalent:code_to_mbclen- Specified by:
codeToMbcLengthin classEncoding
-
ctypeCodeRange
onigenc_utf16_32_get_ctype_code_range- Specified by:
ctypeCodeRangein classEncoding
-
leftAdjustCharHead
public final int leftAdjustCharHead(byte[] bytes, int p, int s, int end) Description copied from class:EncodingSeeks the previous character head in a stream Oniguruma equivalent:left_adjust_char_head- Specified by:
leftAdjustCharHeadin classEncoding- Parameters:
bytes- byte streamp- positions- stopend- end
-
isReverseMatchAllowed
public final boolean isReverseMatchAllowed(byte[] bytes, int p, int end) Description copied from class:EncodingReturns true if it's safe to use reversal Boyer-Moore search fail fast algorithm Oniguruma equivalent:is_allowed_reverse_match- Specified by:
isReverseMatchAllowedin classEncoding
-
isCodeCTypeInternal
protected final boolean isCodeCTypeInternal(int code, int ctype) ONIGENC_IS_XXXXXX_CODE_CTYPE -
isNewLine
public boolean isNewLine(byte[] bytes, int p, int end) onigenc_is_mbc_newline_0x0a / used also by multibyte encodings -
asciiMbcCaseFold
-
asciiApplyAllCaseFold
-
asciiCaseFoldCodesByString
protected final CaseFoldCodeItem[] asciiCaseFoldCodesByString(int flag, byte[] bytes, int p, int end)
-