Top Fields Constructors Methods
org.jcodings

pack-priv abstract Class AbstractEncoding

extends Encoding
Class Inheritance
Known Direct Subclasses
org.jcodings.MultiByteEncoding, org.jcodings.SingleByteEncoding
Imports
org.jcodings.ascii.AsciiTables, org.jcodings.constants.PosixBracket, org.jcodings.exception.CharacterPropertyException, .EncodingError

Field Summary

Modifier and TypeField and Description
private final short[]
Inherited from org.jcodings.Encoding:
CHAR_INVALIDisUnicodeisUTF8maxLengthminLengthNEW_LINE

Constructor Summary

AccessConstructor and Description
protected
AbstractEncoding(String name, int minLength, int maxLength, short[] CTypeTable)

Method Summary

Modifier and TypeMethod and Description
public void
applyAllCaseFold(int
case fold flag
flag
,
ApplyAllCaseFoldFunction
case folding functor (look at: ApplyCaseFold)
fun
,
Object
case folding functor argument (look at: ApplyCaseFoldArg) Oniguruma equivalent: apply_all_case_fold
arg
)

Implements abstract org.jcodings.Encoding.applyAllCaseFold.

onigenc_ascii_apply_all_case_fold / used also by multibyte encodings
protected final void
protected final CaseFoldCodeItem[]
asciiCaseFoldCodesByString(int flag, byte[] bytes, int p, int end)

protected final int
asciiMbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] lower)

pack-priv int
asciiOnlyCaseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)

onigenc_ascii_only_case_map / onigenc_single_byte_ascii_only_case_map

public CaseFoldCodeItem[]
caseFoldCodesByString(int flag, byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.caseFoldCodesByString.

onigenc_ascii_get_case_fold_codes_by_str / used also by multibyte encodings
private static int
CTypeToBit(int ctype)

CTYPE_TO_BIT

protected final boolean
isCodeCTypeInternal(int code, int ctype)

ONIGENC_IS_XXXXXX_CODE_CTYPE

public boolean
isNewLine(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.isNewLine.

onigenc_is_mbc_newline_0x0a / used also by multibyte encodings
public int
mbcCaseFold(int
case fold flag
flag
,
byte[] bytes, IntHolder
an IntHolder that points at character head
pp
,
int end, byte[]
a buffer where to extract case folded character Oniguruma equivalent: mbc_case_fold
lower
)

Implements abstract org.jcodings.Encoding.mbcCaseFold.

onigenc_ascii_mbc_case_fold
public int
propertyNameToCType(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.propertyNameToCType.

onigenc_minimum_property_name_to_ctype notably overridden by unicode encodings
pack-priv int
singleByteAsciiOnlyCaseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)

Inherited from org.jcodings.Encoding:
asciiToLowerasciiToUppercaseMapcodeToMbccodeToMbcLengthctypeCodeRangedigitValequalsgetCharsetgetCharsetNamegetIndexgetNamehashCodeisAlnumisAlphaisAsciiisAsciiisAsciiCompatibleisBlankisCntrlisCodeCTypeisDigitisDummyisFixedWidthisGraphisLowerisMbcAsciiisMbcCrnlisMbcHeadisMbcWordisNewLineisPrintisPunctisReverseMatchAllowedisSbWordisSingleByteisSpaceisUnicodeisUpperisUTF8isWordisWordGraphPrintisXDigitleftAdjustCharHeadlengthlengthloadloadmaxLengthmaxLengthDistancembcodeStartPositionmbcToCodeminLengthodigitValprevCharHeadreplicaterightAdjustCharHeadrightAdjustCharHeadWithPrevsetDummysetNamesetNamestepstepBackstrByteLengthNullstrCodeAtstrLengthstrLengthNullstrNCmptoLowerCaseTabletoStringxdigitVal

Field Detail

CTypeTableback to summary
private final short[] CTypeTable

Constructor Detail

AbstractEncodingback to summary
protected AbstractEncoding(String name, int minLength, int maxLength, short[] CTypeTable)

Method Detail

applyAllCaseFoldback to summary
public void applyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg)

Implements abstract org.jcodings.Encoding.applyAllCaseFold.

onigenc_ascii_apply_all_case_fold / used also by multibyte encodings

Parameters
flag:int

Doc from org.jcodings.Encoding.applyAllCaseFold.

case fold flag

fun:ApplyAllCaseFoldFunction

Doc from org.jcodings.Encoding.applyAllCaseFold.

case folding functor (look at: ApplyCaseFold)

arg:Object

Doc from org.jcodings.Encoding.applyAllCaseFold.

case folding functor argument (look at: ApplyCaseFoldArg) Oniguruma equivalent: apply_all_case_fold

Annotations
@Override
asciiApplyAllCaseFoldback to summary
protected final void asciiApplyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg)
asciiCaseFoldCodesByStringback to summary
protected final CaseFoldCodeItem[] asciiCaseFoldCodesByString(int flag, byte[] bytes, int p, int end)
asciiMbcCaseFoldback to summary
protected final int asciiMbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] lower)
asciiOnlyCaseMapback to summary
pack-priv int asciiOnlyCaseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)

onigenc_ascii_only_case_map / onigenc_single_byte_ascii_only_case_map

caseFoldCodesByStringback to summary
public CaseFoldCodeItem[] caseFoldCodesByString(int flag, byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.caseFoldCodesByString.

onigenc_ascii_get_case_fold_codes_by_str / used also by multibyte encodings

Annotations
@Override
CTypeToBitback to summary
private static int CTypeToBit(int ctype)

CTYPE_TO_BIT

isCodeCTypeInternalback to summary
protected final boolean isCodeCTypeInternal(int code, int ctype)

ONIGENC_IS_XXXXXX_CODE_CTYPE

isNewLineback to summary
public boolean isNewLine(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.isNewLine.

onigenc_is_mbc_newline_0x0a / used also by multibyte encodings

Annotations
@Override
mbcCaseFoldback to summary
public int mbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] lower)

Implements abstract org.jcodings.Encoding.mbcCaseFold.

onigenc_ascii_mbc_case_fold

Parameters
flag:int

Doc from org.jcodings.Encoding.mbcCaseFold.

case fold flag

pp:IntHolder

Doc from org.jcodings.Encoding.mbcCaseFold.

an IntHolder that points at character head

lower:byte[]

Doc from org.jcodings.Encoding.mbcCaseFold.

a buffer where to extract case folded character Oniguruma equivalent: mbc_case_fold

Annotations
@Override
propertyNameToCTypeback to summary
public int propertyNameToCType(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.propertyNameToCType.

onigenc_minimum_property_name_to_ctype notably overridden by unicode encodings

Annotations
@Override
singleByteAsciiOnlyCaseMapback to summary
pack-priv int singleByteAsciiOnlyCaseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)