| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| private Charset | |
| private static int | |
| private int | |
| private int | |
| private boolean | |
| private boolean | |
| private final boolean | |
| private final boolean | |
| protected boolean | |
| protected boolean | |
| protected final int | |
| protected final int | |
| private byte[] | |
| public static final byte | |
| private String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | applyAllCaseFold(int
case fold flag flag, ApplyAllCaseFoldFunction case folding functor (look at: fun, Object ApplyCaseFold)case folding functor argument (look at: arg)ApplyCaseFoldArg)
Oniguruma equivalent: apply_all_case_foldExpand case folds given a character class (used for case insensitive matching) |
| public static byte | |
| public static byte | |
| public abstract CaseFoldCodeItem[] | caseFoldCodesByString(int flag, byte[] bytes, int p, int end)
Expand AST string nodes into their folded alternatives (look at: |
| public abstract int | |
| public abstract int | Returns: character length for the given code point Oniguruma equivalent:code_to_mbcExtracts code point into it's multibyte representation |
| public abstract int | codeToMbcLength(int code)
Returns character length given a code point
Oniguruma equivalent: |
| public abstract int[] | ctypeCodeRange(int ctype, IntHolder sbOut)
Returns code range for a given character type
Oniguruma equivalent: |
| public static int | |
| public final boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public Charset | |
| public String | Returns: the name of the equivalent Java Charset for this encodingThe name of the equivalent Java Charset for this encoding. |
| public final int | |
| public final byte[] | |
| public final int | |
| public final boolean | |
| public final boolean | |
| public static boolean | |
| public static boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public abstract boolean | isCodeCType(int
a code point of a character code, int a character type to check against
Oniguruma equivalent: ctype)is_code_ctypePerform a check whether given code is of given character type (e.g. used by isWord(someByte) and similar methods) |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public static boolean | |
| public boolean | |
| public final boolean | |
| public final boolean | |
| public abstract boolean | isNewLine(byte[] bytes, int p, int end)
Returns true if |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public abstract boolean | isReverseMatchAllowed(byte[] bytes, int p, int end)
Returns true if it's safe to use reversal Boyer-Moore search fail fast algorithm
Oniguruma equivalent: |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public static boolean | |
| public final boolean | |
| public abstract int | leftAdjustCharHead(byte[]
byte stream bytes, int position p, int stop s, int end end)Seeks the previous character head in a stream
Oniguruma equivalent: |
| public abstract int | length(byte
Character head
Oniguruma equivalent: c)mbc_enc_len
To be deprecated very soon (use length(byte[]bytes, int p, int end) version)Returns character length given character head
returns |
| public abstract int | Returns: 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,Returns character length given stream, character position and stream end
returns |
| public static Encoding | |
| public static Encoding | |
| public final int | maxLength()
Returns maximum character byte length that can appear in an encoding
Oniguruma equivalent: |
| public final int | |
| public abstract int | mbcCaseFold(int
case fold flag flag, byte[] bytes, IntHolder an pp, int end, byte[] IntHolder that points at character heada buffer where to extract case folded character
Oniguruma equivalent: to)mbc_case_foldPerforms case folding for a character at |
| public final int | |
| public abstract int | mbcToCode(byte[] bytes, int p, int end)
Returns code point for a character
Oniguruma equivalent: |
| public final int | minLength()
Returns minimum character byte length that can appear in an encoding
Oniguruma equivalent: |
| public static int | |
| public final int | |
| public abstract int | propertyNameToCType(byte[] bytes, int p, int end)
Returns character type given character type name (used when e.g. \p{Alpha})
Oniguruma equivalent: |
| pack-priv Encoding | |
| public final int | |
| public final int | |
| protected final void | |
| protected final void | |
| protected final void | |
| public final int | |
| public final int | |
| public final int | |
| public abstract int | |
| public abstract int | |
| public final int | |
| public final int | |
| public byte[] | Returns: lower case tableReturns lower case table if it's safe to use it directly, otherwise |
| public final String | |
| public final int |
| CHAR_INVALID | back to summary |
|---|---|
| public static final int CHAR_INVALID | |
| charset | back to summary |
|---|---|
| private Charset charset | |
| count | back to summary |
|---|---|
| private static int count | |
| hashCode | back to summary |
|---|---|
| private int hashCode | |
| index | back to summary |
|---|---|
| private int index | |
| isAsciiCompatible | back to summary |
|---|---|
| private boolean isAsciiCompatible | |
| isDummy | back to summary |
|---|---|
| private boolean isDummy | |
| isFixedWidth | back to summary |
|---|---|
| private final boolean isFixedWidth | |
| isSingleByte | back to summary |
|---|---|
| private final boolean isSingleByte | |
| isUnicode | back to summary |
|---|---|
| protected boolean isUnicode | |
| isUTF8 | back to summary |
|---|---|
| protected boolean isUTF8 | |
| maxLength | back to summary |
|---|---|
| protected final int maxLength | |
| minLength | back to summary |
|---|---|
| protected final int minLength | |
| name | back to summary |
|---|---|
| private byte[] name | |
| NEW_LINE | back to summary |
|---|---|
| public static final byte NEW_LINE | |
| stringName | back to summary |
|---|---|
| private String stringName | |
| Encoding | back to summary |
|---|---|
| protected Encoding(String name, int minLength, int maxLength) | |
| applyAllCaseFold | back to summary |
|---|---|
| public abstract void applyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg) Expand case folds given a character class (used for case insensitive matching)
| |
| asciiToLower | back to summary |
|---|---|
| public static byte asciiToLower(int c) | |
| asciiToUpper | back to summary |
|---|---|
| public static byte asciiToUpper(int c) | |
| caseFoldCodesByString | back to summary |
|---|---|
| public abstract CaseFoldCodeItem[] caseFoldCodesByString(int flag, byte[] bytes, int p, int end) Expand AST string nodes into their folded alternatives (look at: | |
| caseMap | back to summary |
|---|---|
| public abstract int caseMap(IntHolder flagP, byte[] bytes, IntHolder pp, int end, byte[] to, int toP, int toEnd) Oniguruma equivalent: | |
| codeToMbc | back to summary |
|---|---|
| public abstract int codeToMbc(int code, byte[] bytes, int p) Extracts code point into it's multibyte representation
| |
| codeToMbcLength | back to summary |
|---|---|
| public abstract int codeToMbcLength(int code) Returns character length given a code point
Oniguruma equivalent: | |
| ctypeCodeRange | back to summary |
|---|---|
| public abstract int[] ctypeCodeRange(int ctype, IntHolder sbOut) Returns code range for a given character type
Oniguruma equivalent: | |
| digitVal | back to summary |
|---|---|
| public static int digitVal(int code) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() If this encoding is capable of being represented by a Java Charset then provide it. Otherwise this will raise a CharsetNotFound error via the JDK APIs. To reduce cases like jruby/jruby#4716, we always attempt to find a charset here, and default to using the encoding name which is never null. Either the encoding will exist in the JDK or it will fail hard, rather than propagating a null Charset. Encodings with names different than those found in the JDK can override this getCharsetName to provide that name or getCharset to return the right Charset. | |
| getCharsetName | back to summary |
|---|---|
| public String getCharsetName() The name of the equivalent Java Charset for this encoding. Defaults to the name of the encoding. Subclasses can override this to provide a different name.
| |
| getIndex | back to summary |
|---|---|
| public final int getIndex() | |
| getName | back to summary |
|---|---|
| public final byte[] getName() | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isAlnum | back to summary |
|---|---|
| public final boolean isAlnum(int code) | |
| isAlpha | back to summary |
|---|---|
| public final boolean isAlpha(int code) | |
| isAscii | back to summary |
|---|---|
| public static boolean isAscii(int code) | |
| isAscii | back to summary |
|---|---|
| public static boolean isAscii(byte b) | |
| isAsciiCompatible | back to summary |
|---|---|
| public final boolean isAsciiCompatible() | |
| isBlank | back to summary |
|---|---|
| public final boolean isBlank(int code) | |
| isCntrl | back to summary |
|---|---|
| public final boolean isCntrl(int code) | |
| isCodeCType | back to summary |
|---|---|
| public abstract boolean isCodeCType(int code, int ctype) Perform a check whether given code is of given character type (e.g. used by isWord(someByte) and similar methods)
| |
| isDigit | back to summary |
|---|---|
| public final boolean isDigit(int code) | |
| isDummy | back to summary |
|---|---|
| public final boolean isDummy() | |
| isFixedWidth | back to summary |
|---|---|
| public final boolean isFixedWidth() | |
| isGraph | back to summary |
|---|---|
| public final boolean isGraph(int code) | |
| isLower | back to summary |
|---|---|
| public final boolean isLower(int code) | |
| isMbcAscii | back to summary |
|---|---|
| public static boolean isMbcAscii(byte b) | |
| isMbcCrnl | back to summary |
|---|---|
| public boolean isMbcCrnl(byte[] bytes, int p, int end) | |
| isMbcHead | back to summary |
|---|---|
| public final boolean isMbcHead(byte[] bytes, int p, int end) | |
| isMbcWord | back to summary |
|---|---|
| public final boolean isMbcWord(byte[] bytes, int p, int end) | |
| isNewLine | back to summary |
|---|---|
| public abstract boolean isNewLine(byte[] bytes, int p, int end) Returns true if | |
| isNewLine | back to summary |
|---|---|
| public final boolean isNewLine(int code) | |
| isPrint | back to summary |
|---|---|
| public final boolean isPrint(int code) | |
| isPunct | back to summary |
|---|---|
| public final boolean isPunct(int code) | |
| isReverseMatchAllowed | back to summary |
|---|---|
| public abstract boolean isReverseMatchAllowed(byte[] bytes, int p, int end) Returns true if it's safe to use reversal Boyer-Moore search fail fast algorithm
Oniguruma equivalent: | |
| isSbWord | back to summary |
|---|---|
| public final boolean isSbWord(int code) | |
| isSingleByte | back to summary |
|---|---|
| public final boolean isSingleByte() | |
| isSpace | back to summary |
|---|---|
| public final boolean isSpace(int code) | |
| isUnicode | back to summary |
|---|---|
| public final boolean isUnicode() | |
| isUpper | back to summary |
|---|---|
| public final boolean isUpper(int code) | |
| isUTF8 | back to summary |
|---|---|
| public final boolean isUTF8() | |
| isWord | back to summary |
|---|---|
| public final boolean isWord(int code) | |
| isWordGraphPrint | back to summary |
|---|---|
| public static boolean isWordGraphPrint(int ctype) | |
| isXDigit | back to summary |
|---|---|
| public final boolean isXDigit(int code) | |
| leftAdjustCharHead | back to summary |
|---|---|
| public abstract int leftAdjustCharHead(byte[] bytes, int p, int s, int end) Seeks the previous character head in a stream
Oniguruma equivalent:
| |
| length | back to summary |
|---|---|
| public abstract int length(byte c) Returns character length given character head
returns
| |
| length | back to summary |
|---|---|
| public abstract int length(byte[] bytes, int p, int end) Returns character length given stream, character position and stream end
returns
| |
| load | back to summary |
|---|---|
| public static Encoding load(String name) | |
| load | back to summary |
|---|---|
| public static Encoding load(String name, String pkg) | |
| maxLength | back to summary |
|---|---|
| public final int maxLength() Returns maximum character byte length that can appear in an encoding
Oniguruma equivalent: | |
| maxLengthDistance | back to summary |
|---|---|
| public final int maxLengthDistance()
Deprecated
| |
| mbcCaseFold | back to summary |
|---|---|
| public abstract int mbcCaseFold(int flag, byte[] bytes, IntHolder pp, int end, byte[] to) Performs case folding for a character at
| |
| mbcodeStartPosition | back to summary |
|---|---|
| public final int mbcodeStartPosition()
Deprecated
| |
| mbcToCode | back to summary |
|---|---|
| public abstract int mbcToCode(byte[] bytes, int p, int end) Returns code point for a character
Oniguruma equivalent: | |
| minLength | back to summary |
|---|---|
| public final int minLength() Returns minimum character byte length that can appear in an encoding
Oniguruma equivalent: | |
| odigitVal | back to summary |
|---|---|
| public static int odigitVal(int code) | |
| prevCharHead | back to summary |
|---|---|
| public final int prevCharHead(byte[] bytes, int p, int s, int end) | |
| propertyNameToCType | back to summary |
|---|---|
| public abstract int propertyNameToCType(byte[] bytes, int p, int end) Returns character type given character type name (used when e.g. \p{Alpha})
Oniguruma equivalent: | |
| replicate | back to summary |
|---|---|
| pack-priv Encoding replicate(byte[] name) | |
| rightAdjustCharHead | back to summary |
|---|---|
| public final int rightAdjustCharHead(byte[] bytes, int p, int s, int end) | |
| rightAdjustCharHeadWithPrev | back to summary |
|---|---|
| public final int rightAdjustCharHeadWithPrev(byte[] bytes, int p, int s, int end, IntHolder prev) | |
| setDummy | back to summary |
|---|---|
| protected final void setDummy() | |
| setName | back to summary |
|---|---|
| protected final void setName(String name) | |
| setName | back to summary |
|---|---|
| protected final void setName(byte[] name) | |
| step | back to summary |
|---|---|
| public final int step(byte[] bytes, int p, int end, int n) | |
| stepBack | back to summary |
|---|---|
| public final int stepBack(byte[] bytes, int p, int s, int end, int n) | |
| strByteLengthNull | back to summary |
|---|---|
| public final int strByteLengthNull(byte[] bytes, int p, int end) | |
| strCodeAt | back to summary |
|---|---|
| public abstract int strCodeAt(byte[] bytes, int p, int end, int index) | |
| strLength | back to summary |
|---|---|
| public abstract int strLength(byte[] bytes, int p, int end) | |
| strLengthNull | back to summary |
|---|---|
| public final int strLengthNull(byte[] bytes, int p, int end) | |
| strNCmp | back to summary |
|---|---|
| public final int strNCmp(byte[] bytes, int p, int end, byte[] ascii, int asciiP, int n) | |
| toLowerCaseTable | back to summary |
|---|---|
| public byte[] toLowerCaseTable() Returns lower case table if it's safe to use it directly, otherwise
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| xdigitVal | back to summary |
|---|---|
| public final int xdigitVal(int code) | |