public final class Text
extends java.lang.Object
implements java.io.Serializable
UTF-8 encoded text string.
Constructor and Description |
---|
Text(byte[] bytes)
Create a new Text instance from bytes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static Text |
fromString(java.lang.String string)
Create a new Text instance from a string.
|
int |
hashCode() |
int |
size() |
java.lang.String |
toString() |
public Text(byte[] bytes)
Create a new Text instance from bytes.
bytes
- The bytes (must be valid UTF-8). The array of bytes is copied.public static Text fromString(java.lang.String string)
Create a new Text instance from a string.
string
- The string.public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object