Class SingleByteEncoding
java.lang.Object
org.jcodings.Encoding
org.jcodings.AbstractEncoding
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 TypeMethodDescriptionintOniguruma 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_rangefinal 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 otherwiseintmbcToCode(byte[] bytes, int p, int end) onigenc_single_byte_mbc_to_codeintstrCodeAt(byte[] bytes, int p, int end, int index) final intstrLength(byte[] bytes, int p, int end) Methods inherited from class AbstractEncoding
applyAllCaseFold, asciiApplyAllCaseFold, asciiCaseFoldCodesByString, asciiMbcCaseFold, asciiOnlyCaseMap, caseFoldCodesByString, isCodeCTypeInternal, isNewLine, mbcCaseFold, propertyNameToCType, singleByteAsciiOnlyCaseMapMethods inherited from class 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, replicate, 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
-
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
-
strCodeAt
-
caseMap
-
mbcToCode
-
codeToMbcLength
public int codeToMbcLength(int code) onigenc_single_byte_code_to_mbclen- Specified by:
codeToMbcLengthin classEncoding
-
codeToMbc
-
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
-