Package org.jcodings
Class SingleByteEncoding
- java.lang.Object
-
- org.jcodings.Encoding
-
- org.jcodings.AbstractEncoding
-
- org.jcodings.SingleByteEncoding
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
ASCIIEncoding,CaseFoldMapEncoding,USASCIIEncoding
public abstract class SingleByteEncoding extends AbstractEncoding
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]LowerCaseTablestatic intMAX_BYTE
-
Constructor Summary
Constructors Modifier Constructor Description protectedSingleByteEncoding(java.lang.String name, short[] CTypeTable, byte[] LowerCaseTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcaseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)Oniguruma equivalent:case_mapintcodeToMbc(int code, byte[] bytes, int p)onigenc_single_byte_code_to_mbcintcodeToMbcLength(int code)onigenc_single_byte_code_to_mbclenint[]ctypeCodeRange(int ctype, IntHolder sbOut)onigenc_not_support_get_ctype_code_rangebooleanisReverseMatchAllowed(byte[] bytes, int p, int end)onigenc_always_true_is_allowed_reverse_matchintleftAdjustCharHead(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)intstrLength(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 Detail
-
MAX_BYTE
public static final int MAX_BYTE
- See Also:
- Constant Field Values
-
LowerCaseTable
protected final byte[] LowerCaseTable
-
-
Method Detail
-
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
public final int[] ctypeCodeRange(int ctype, IntHolder sbOut)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
-
-