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 | set(Utf8 other) | 
| 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() | 
clone, finalize, getClass, notify, notifyAll, wait, wait, waitchars, codePointspublic Utf8()
public Utf8(String string)
public Utf8(Utf8 other)
public Utf8(byte[] bytes)
public byte[] getBytes()
getByteLength().@Deprecated public int getLength()
getByteLength() instead.public int getByteLength()
@Deprecated public Utf8 setLength(int newLength)
setByteLength(int) instead.public Utf8 setByteLength(int newLength)
public String toString()
toString in interface CharSequencetoString in class Objectpublic int compareTo(Utf8 that)
compareTo in interface Comparable<Utf8>public char charAt(int index)
charAt in interface CharSequencepublic int length()
length in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic static byte[] getBytesFor(String str)
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.