public class Utf8 extends Object implements Comparable<Utf8>, CharSequence
Constructor and Description |
---|
Utf8() |
Utf8(byte[] bytes) |
Utf8(String string) |
Utf8(Utf8 other) |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
int |
compareTo(Utf8 that) |
boolean |
equals(Object o) |
int |
getByteLength()
Return length in bytes.
|
byte[] |
getBytes()
Return UTF-8 encoded bytes.
|
static byte[] |
getBytesFor(String str)
Gets the UTF-8 bytes for a String
|
int |
getLength()
Deprecated.
call
getByteLength() instead. |
int |
hashCode() |
int |
length() |
Utf8 |
set(String string)
Set to the contents of a String.
|
Utf8 |
setByteLength(int newLength)
Set length in bytes.
|
Utf8 |
setLength(int newLength)
Deprecated.
call
setByteLength(int) instead. |
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
public Utf8()
public Utf8(String string)
public Utf8(Utf8 other)
public Utf8(byte[] bytes)
public byte[] getBytes()
getByteLength()
.public int getLength()
getByteLength()
instead.public int getByteLength()
public Utf8 setLength(int newLength)
setByteLength(int)
instead.public Utf8 setByteLength(int newLength)
public String toString()
toString
in interface CharSequence
toString
in class Object
public int compareTo(Utf8 that)
compareTo
in interface Comparable<Utf8>
public char charAt(int index)
charAt
in interface CharSequence
public int length()
length
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public static final byte[] getBytesFor(String str)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.