Class SingleByteEncoding
java.lang.Object
org.graalvm.shadowed.org.jcodings.Encoding
org.graalvm.shadowed.org.jcodings.SingleByteEncoding
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ASCIIEncoding,CaseFoldMapEncoding,USASCIIEncoding
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingleByteEncoding(String name, short[] CTypeTable, byte[] LowerCaseTable) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg) onigenc_ascii_apply_all_case_fold / used also by multibyte encodingsprotected 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) caseFoldCodesByString(int flag, byte[] bytes, int p, int end) onigenc_ascii_get_case_fold_codes_by_str / used also by multibyte encodingsintOniguruma equivalent:case_mapfinal intcodeToMbc(int code, byte[] bytes, int p) onigenc_single_byte_code_to_mbcintcodeToMbcLength(int code) onigenc_single_byte_code_to_mbclenfinal int[]ctypeCodeRange(int ctype, IntHolder sbOut) onigenc_not_support_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) onigenc_always_true_is_allowed_reverse_matchfinal intleftAdjustCharHead(byte[] bytes, int p, int s, int end) onigenc_single_byte_left_adjust_char_headintlength(byte c) onigenc_single_byte_mbc_enc_lenintlength(byte[] bytes, int p, int end) 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 otherwiseintmbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] lower) onigenc_ascii_mbc_case_foldintmbcToCode(byte[] bytes, int p, int end) onigenc_single_byte_mbc_to_codeintpropertyNameToCType(byte[] bytes, int p, int end) onigenc_minimum_property_name_to_ctype notably overridden by unicode encodingsintstrCodeAt(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.Encoding
asciiToLower, asciiToUpper, 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, load, load, maxLength, maxLengthDistance, mbcodeStartPosition, minLength, odigitVal, prevCharHead, rightAdjustCharHead, rightAdjustCharHeadWithPrev, setDummy, setName, setName, step, stepBack, strByteLengthNull, strLengthNull, strNCmp, toLowerCaseTable, toString, xdigitVal
-
Field Details
-
MAX_BYTE
public static final int MAX_BYTE- See Also:
-
LowerCaseTable
protected final byte[] LowerCaseTable
-
-
Constructor Details
-
SingleByteEncoding
-
-
Method Details
-
length
public int length(byte c) onigenc_single_byte_mbc_enc_len -
length
public int length(byte[] bytes, int p, int end) 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) -
strCodeAt
public int strCodeAt(byte[] bytes, int p, int end, int index) -
caseMap
public int caseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd) Description copied from class:EncodingOniguruma equivalent:case_map -
mbcToCode
public int mbcToCode(byte[] bytes, int p, int end) onigenc_single_byte_mbc_to_code -
codeToMbcLength
public int codeToMbcLength(int code) onigenc_single_byte_code_to_mbclen- Specified by:
codeToMbcLengthin classEncoding
-
codeToMbc
public final int codeToMbc(int code, byte[] bytes, int p) onigenc_single_byte_code_to_mbc -
ctypeCodeRange
onigenc_not_support_get_ctype_code_range- Specified by:
ctypeCodeRangein classEncoding
-
leftAdjustCharHead
public final int leftAdjustCharHead(byte[] bytes, int p, int s, int end) onigenc_single_byte_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) onigenc_always_true_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
-
mbcCaseFold
onigenc_ascii_mbc_case_fold- Specified by:
mbcCaseFoldin classEncoding- Parameters:
flag- case fold flagpp- anIntHolderthat points at character headlower- a buffer where to extract case folded character Oniguruma equivalent:mbc_case_fold
-
asciiApplyAllCaseFold
-
applyAllCaseFold
onigenc_ascii_apply_all_case_fold / used also by multibyte encodings- Specified by:
applyAllCaseFoldin classEncoding- Parameters:
flag- case fold flagfun- case folding functor (look at:ApplyCaseFold)arg- case folding functor argument (look at:ApplyCaseFoldArg) Oniguruma equivalent:apply_all_case_fold
-
asciiCaseFoldCodesByString
protected final CaseFoldCodeItem[] asciiCaseFoldCodesByString(int flag, byte[] bytes, int p, int end) -
caseFoldCodesByString
onigenc_ascii_get_case_fold_codes_by_str / used also by multibyte encodings- Specified by:
caseFoldCodesByStringin classEncoding
-
propertyNameToCType
public int propertyNameToCType(byte[] bytes, int p, int end) onigenc_minimum_property_name_to_ctype notably overridden by unicode encodings- Specified by:
propertyNameToCTypein classEncoding
-