Package com.yahoo.text
Class AbstractUtf8Array
java.lang.Object
com.yahoo.text.AbstractUtf8Array
- All Implemented Interfaces:
Comparable<AbstractUtf8Array>
- Direct Known Subclasses:
Utf8Array
- Author:
- baldersheim
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
byte
getByte
(int index) Returns the byte at the given position.abstract int
Returns the length in bytes of the utf8 sequence.protected abstract int
Returns the offset in the backing array where the utf8 sequence starts.protected abstract byte[]
getBytes()
Returns the backing byte array.int
hashCode()
boolean
isEmpty()
toString()
Retuerns the utf8 sequence as a Java string.wrap()
Wraps the utf8 sequence in a ByteBufferfinal void
writeTo
(ByteBuffer target) Writes the utf8 sequence to the given target.
-
Constructor Details
-
AbstractUtf8Array
public AbstractUtf8Array()
-
-
Method Details
-
writeTo
Writes the utf8 sequence to the given target. -
getByte
public byte getByte(int index) Returns the byte at the given position. -
getByteLength
public abstract int getByteLength()Returns the length in bytes of the utf8 sequence. -
wrap
Wraps the utf8 sequence in a ByteBuffer- Returns:
- the wrapping buffer
-
getBytes
protected abstract byte[] getBytes()Returns the backing byte array. -
isEmpty
public boolean isEmpty() -
getByteOffset
protected abstract int getByteOffset()Returns the offset in the backing array where the utf8 sequence starts. -
hashCode
public int hashCode() -
equals
-
toString
Retuerns the utf8 sequence as a Java string. -
compareTo
- Specified by:
compareTo
in interfaceComparable<AbstractUtf8Array>
-
ascii7BitLowerCase
-