Top Fields Constructors Methods
org.jcodings

public abstract Class MultiByteEncoding

extends AbstractEncoding
Class Inheritance
Known Direct Subclasses
org.jcodings.specific.EmacsMuleEncoding, org.jcodings.specific.GB18030Encoding, org.jcodings.unicode.UnicodeEncoding, org.jcodings.CanBeTrailTableEncoding, org.jcodings.EucEncoding
Imports
org.jcodings.ascii.AsciiTables, org.jcodings.exception.ErrorCodes

Field Summary

Modifier and TypeField and Description
protected static final int
A

protected final int[]
protected static final int
F

protected final int[][]
protected final int[]

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public int
caseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)

Implements abstract org.jcodings.Encoding.caseMap.

Oniguruma equivalent: case_map
public static boolean
isInRange(int code, int from, int to)

public int
length(byte
Character head Oniguruma equivalent: mbc_enc_len To be deprecated very soon (use length(byte[]bytes, int p, int end) version)
c
)

Implements abstract org.jcodings.Encoding.length.

Returns character length given character head returns 1 for singlebyte encodings or performs direct length table lookup for multibyte ones.
private int
lengthForThree(byte[] bytes, int p, int end, int b, int s)

private int
lengthForThreeUptoFour(byte[] bytes, int p, int end, int b, int s)

private int
lengthForTwo(byte[] bytes, int p, int end, int b, int s)

protected final int
lengthForTwoUptoFour(byte[] bytes, int p, int end, int b, int s)

private int
lengthForTwoUptoThree(byte[] bytes, int p, int end, int b, int s)

protected final int
mb2CodeToMbc(int code, byte[] bytes, int p)

protected final int
protected final boolean
mb2IsCodeCType(int code, int ctype)

protected final int
mb4CodeToMbc(int code, byte[] bytes, int p)

protected final int
protected final boolean
mb4IsCodeCType(int code, int ctype)

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

protected final int
mbnMbcToCode(byte[] bytes, int p, int end)

protected final int
missing(int n)

protected final int
missing(int b, int delta)

protected final int
safeLengthForUptoFour(byte[] bytes, int p, int end)

protected final int
safeLengthForUptoThree(byte[] bytes, int p, int end)

protected final int
safeLengthForUptoTwo(byte[] bytes, int p, int end)

public int
strCodeAt(byte[] bytes, int p, int end, int index)

Implements abstract org.jcodings.Encoding.strCodeAt.

public int
strLength(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.strLength.

Inherited from org.jcodings.AbstractEncoding:
applyAllCaseFoldasciiApplyAllCaseFoldasciiCaseFoldCodesByStringasciiMbcCaseFoldasciiOnlyCaseMapcaseFoldCodesByStringisCodeCTypeInternalisNewLinembcCaseFoldpropertyNameToCTypesingleByteAsciiOnlyCaseMap

Field Detail

Aback to summary
protected static final int A
EncLenback to summary
protected final int[] EncLen
Fback to summary
protected static final int F
Transback to summary
protected final int[][] Trans
TransZeroback to summary
protected final int[] TransZero

Constructor Detail

MultiByteEncodingback to summary
protected MultiByteEncoding(String name, int minLength, int maxLength, int[] EncLen, int[][] Trans, short[] CTypeTable)

Method Detail

caseMapback to summary
public int caseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd)

Implements abstract org.jcodings.Encoding.caseMap.

Doc from org.jcodings.Encoding.caseMap.

Oniguruma equivalent: case_map

Annotations
@Override
isInRangeback to summary
public static boolean isInRange(int code, int from, int to)
lengthback to summary
public int length(byte c)

Implements abstract org.jcodings.Encoding.length.

Doc from org.jcodings.Encoding.length.

Returns character length given character head returns 1 for singlebyte encodings or performs direct length table lookup for multibyte ones.

Parameters
c:byte

Character head Oniguruma equivalent: mbc_enc_len To be deprecated very soon (use length(byte[]bytes, int p, int end) version)

Annotations
@Override
lengthForThreeback to summary
private int lengthForThree(byte[] bytes, int p, int end, int b, int s)
lengthForThreeUptoFourback to summary
private int lengthForThreeUptoFour(byte[] bytes, int p, int end, int b, int s)
lengthForTwoback to summary
private int lengthForTwo(byte[] bytes, int p, int end, int b, int s)
lengthForTwoUptoFourback to summary
protected final int lengthForTwoUptoFour(byte[] bytes, int p, int end, int b, int s)
lengthForTwoUptoThreeback to summary
private int lengthForTwoUptoThree(byte[] bytes, int p, int end, int b, int s)
mb2CodeToMbcback to summary
protected final int mb2CodeToMbc(int code, byte[] bytes, int p)
mb2CodeToMbcLengthback to summary
protected final int mb2CodeToMbcLength(int code)
mb2IsCodeCTypeback to summary
protected final boolean mb2IsCodeCType(int code, int ctype)
mb4CodeToMbcback to summary
protected final int mb4CodeToMbc(int code, byte[] bytes, int p)
mb4CodeToMbcLengthback to summary
protected final int mb4CodeToMbcLength(int code)
mb4IsCodeCTypeback to summary
protected final boolean mb4IsCodeCType(int code, int ctype)
mbnMbcCaseFoldback to summary
protected final int mbnMbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] lower)
mbnMbcToCodeback to summary
protected final int mbnMbcToCode(byte[] bytes, int p, int end)
missingback to summary
protected final int missing(int n)
missingback to summary
protected final int missing(int b, int delta)
safeLengthForUptoFourback to summary
protected final int safeLengthForUptoFour(byte[] bytes, int p, int end)
safeLengthForUptoThreeback to summary
protected final int safeLengthForUptoThree(byte[] bytes, int p, int end)
safeLengthForUptoTwoback to summary
protected final int safeLengthForUptoTwo(byte[] bytes, int p, int end)
strCodeAtback to summary
public int strCodeAt(byte[] bytes, int p, int end, int index)

Implements abstract org.jcodings.Encoding.strCodeAt.

strLengthback to summary
public int strLength(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.strLength.