|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.WrappedByteArrayCharSequence
public final class WrappedByteArrayCharSequence
Lightweight CharSequence that wraps a portion of an underlying byte array. The underlying bytes cannot be altered via this interface, but changes to the underlying bytes may be visible through this wrapper (subject to the JMM, if different threads are involved), ie this is mutable and thus not thread-safe without external synchronisation.
| Field Summary | |
|---|---|
private int |
length
Length of exposed fragment, non-negative. |
private int |
offset
Offset into underlying buffer, non-negative. |
private byte[] |
text
Underlying 8-bit text; never null. |
| Constructor Summary | |
|---|---|
WrappedByteArrayCharSequence(byte[] text,
int offset,
int length)
Expose portion of byte array from offset of specified length. |
|
| Method Summary | |
|---|---|
byte |
byteAt(int index)
Returns byte value at given index. |
char |
charAt(int index)
|
int |
length()
|
java.lang.CharSequence |
subSequence(int start,
int end)
|
byte[] |
toByteArray()
Return private copy (8-bit) text with each byte corresponding to one char; never null. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final byte[] text
private final int length
private final int offset
| Constructor Detail |
|---|
public WrappedByteArrayCharSequence(byte[] text,
int offset,
int length)
| Method Detail |
|---|
public int length()
length in interface java.lang.CharSequencepublic byte byteAt(int index)
TextUtils.CharSequence8Bit
byteAt in interface TextUtils.CharSequence8Bitpublic char charAt(int index)
charAt in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic byte[] toByteArray()
toByteArray in interface TextUtils.CharSequence8Bit
|
DHD Multimedia Gallery V1.60.69 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||