Package org.jcodings
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
ConstructorsModifierConstructorDescriptionprotected
SingleByteEncoding
(String name, short[] CTypeTable, byte[] LowerCaseTable) -
Method Summary
Modifier and TypeMethodDescriptionint
Oniguruma equivalent:case_map
final int
codeToMbc
(int code, byte[] bytes, int p) onigenc_single_byte_code_to_mbcint
codeToMbcLength
(int code) onigenc_single_byte_code_to_mbclenfinal int[]
ctypeCodeRange
(int ctype, IntHolder sbOut) onigenc_not_support_get_ctype_code_rangefinal boolean
isReverseMatchAllowed
(byte[] bytes, int p, int end) onigenc_always_true_is_allowed_reverse_matchfinal int
leftAdjustCharHead
(byte[] bytes, int p, int s, int end) onigenc_single_byte_left_adjust_char_headint
length
(byte c) onigenc_single_byte_mbc_enc_lenint
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 otherwiseint
mbcToCode
(byte[] bytes, int p, int end) onigenc_single_byte_mbc_to_codeint
strCodeAt
(byte[] bytes, int p, int end, int index) final int
strLength
(byte[] bytes, int p, int end) 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, 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
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: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 -
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:Encoding
Oniguruma 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:
codeToMbcLength
in 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:
ctypeCodeRange
in classEncoding
-
leftAdjustCharHead
public final int leftAdjustCharHead(byte[] bytes, int p, int s, int end) onigenc_single_byte_left_adjust_char_head- Specified by:
leftAdjustCharHead
in 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:
isReverseMatchAllowed
in classEncoding
-