Top Fields Constructors Methods
org.jcodings.specific

public final Class NonStrictUTF8Encoding

extends BaseUTF8Encoding
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final NonStrictUTF8Encoding
private static final int[]
Inherited from org.jcodings.specific.BaseUTF8Encoding:
USE_INVALID_CODE_SCHEME

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public boolean
isCodeCType(int
a code point of a character
code
,
int
a character type to check against Oniguruma equivalent: is_code_ctype
ctype
)

Overrides org.jcodings.unicode.UnicodeEncoding.isCodeCType.

Perform a check whether given code is of given character type (e.g. used by isWord(someByte) and similar methods)
public int
length(byte[] bytes, int p, int end)

Implements abstract org.jcodings.Encoding.length.

Returns character length given stream, character position and stream end returns 1 for singlebyte encodings or performs sanity validations for multibyte ones and returns the character length, missing characters in the stream otherwise
Inherited from org.jcodings.specific.BaseUTF8Encoding:
codeToMbccodeToMbcLengthctypeCodeRangegetCharsetNameisNewLineisReverseMatchAllowedleftAdjustCharHeadmbcCaseFoldmbcToCodetrail0trailS

Field Detail

INSTANCEback to summary
public static final NonStrictUTF8Encoding INSTANCE
UTF8EncLenback to summary
private static final int[] UTF8EncLen

Constructor Detail

NonStrictUTF8Encodingback to summary
protected NonStrictUTF8Encoding()

Method Detail

isCodeCTypeback to summary
public boolean isCodeCType(int code, int ctype)

Overrides org.jcodings.unicode.UnicodeEncoding.isCodeCType.

Doc from org.jcodings.Encoding.isCodeCType.

Perform a check whether given code is of given character type (e.g. used by isWord(someByte) and similar methods)

Parameters
code:int

a code point of a character

ctype:int

a character type to check against Oniguruma equivalent: is_code_ctype

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

Implements abstract org.jcodings.Encoding.length.

Doc from org.jcodings.Encoding.length.

Returns character length given stream, character position and stream end returns 1 for singlebyte encodings or performs sanity validations for multibyte ones and returns the character length, missing characters in the stream otherwise

Returns:int

0 Never > 0 Valid character, length returned -1 Illegal/malformed character < -1 (-1 - n) Number of missing bytes for character in p...end range Oniguruma equivalent: mbc_enc_len modified for 1.9 purposes,

Annotations
@Override