|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.CS8Bit
public final class CS8Bit
Immutable lightweight CharSequence holding 8-bit text only. Internally the text is stored as a byte[] for compactness.
Implements hashCode() and equals() so suitable as a hash key.
| Field Summary | |
|---|---|
private byte[] |
data
The 8-bit text of this sequence; ever null but may be empty. |
private int |
hash
Cache of the computed hash code. |
| Constructor Summary | |
|---|---|
CS8Bit(byte[] d)
Copy from byte array. |
|
CS8Bit(java.lang.CharSequence other)
Copy from another CharSequence, vetoing if any non-8-bit data. |
|
CS8Bit(TextUtils.CharSequence8Bit other)
Copy from another CharSequence8Bit (defensively). |
|
CS8Bit(TextUtils.CharSequence8Bit other,
int start,
int end)
Copy a sub-sequence of another CharSequence8Bit. |
|
| Method Summary | |
|---|---|
char |
charAt(int index)
|
boolean |
equals(java.lang.Object o)
Equality depends on the entire content being the same. |
int |
hashCode()
The hash is computed over the entire text as for String. |
int |
length()
|
TextUtils.CharSequence8Bit |
subSequence(int startSS,
int endSS)
Extract subsequence; never null. |
byte[] |
toByteArray()
Create private byte[] copy for caller; never null. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final byte[] data
private transient int hash
| Constructor Detail |
|---|
public CS8Bit(byte[] d)
public CS8Bit(TextUtils.CharSequence8Bit other)
public CS8Bit(TextUtils.CharSequence8Bit other,
int start,
int end)
other - other sequence; never nullstart - inclusive start indexend - exclusive end index
public CS8Bit(java.lang.CharSequence other)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException| Method Detail |
|---|
public int length()
length in interface java.lang.CharSequencepublic char charAt(int index)
charAt in interface java.lang.CharSequence
public TextUtils.CharSequence8Bit subSequence(int startSS,
int endSS)
subSequence in interface java.lang.CharSequencepublic final java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic final byte[] toByteArray()
toByteArray in interface TextUtils.CharSequence8Bitpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
DHD Multimedia Gallery V1.53.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||