public final class ByteArrayCharSequence extends java.lang.Object implements CharSequenceWithStringHash
Constructor and Description |
---|
ByteArrayCharSequence(byte [] chars) |
ByteArrayCharSequence(byte [] chars,
int start,
int end) |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
static java.lang.CharSequence |
convertToBytesIfAsciiString(java.lang.String name)
Deprecated.
use
convertToBytesIfPossible(CharSequence) instead |
static java.lang.CharSequence |
convertToBytesIfPossible(java.lang.CharSequence string) |
int |
hashCode() |
int |
length() |
java.lang.CharSequence |
subSequence(int start,
int end) |
java.lang.String |
toString() |
public ByteArrayCharSequence(byte [] chars)
public ByteArrayCharSequence(byte [] chars, int start, int end)
public int hashCode()
hashCode
in interface CharSequenceWithStringHash
hashCode
in class java.lang.Object
public final int length()
length
in interface java.lang.CharSequence
public final char charAt(int index)
charAt
in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
@Deprecated public static java.lang.CharSequence convertToBytesIfAsciiString(java.lang.String name)
convertToBytesIfPossible(CharSequence)
insteadpublic static java.lang.CharSequence convertToBytesIfPossible(java.lang.CharSequence string)
ByteArrayCharSequence
if the supplied string can be stored internally
as a byte array of 8-bit code points (for more compact representation); its string
argument otherwise