public class BytesText extends Object implements Text
BytesReference
representation of the text, will always convert on the fly to a String
.Constructor and Description |
---|
BytesText(BytesReference bytes) |
Modifier and Type | Method and Description |
---|---|
BytesReference |
bytes()
The UTF8 bytes representing the the text, might be converted on the fly, see
Text.hasBytes() |
int |
compareTo(Text text) |
boolean |
equals(Object obj) |
boolean |
hasBytes()
Are bytes available without the need to be converted into bytes when calling
Text.bytes() . |
int |
hashCode() |
boolean |
hasString()
Is there a
String representation of the text. |
String |
string()
Returns the string representation of the text, might be converted to a string on the fly.
|
String |
toString()
Returns the string representation of the text, might be converted to a string on the fly.
|
public BytesText(BytesReference bytes)
public boolean hasBytes()
Text
Text.bytes()
.public BytesReference bytes()
Text
Text.hasBytes()
public boolean hasString()
Text
String
representation of the text. If not, then it Text.hasBytes()
.public String string()
Text
public String toString()
Text
public int compareTo(Text text)
compareTo
in interface Comparable<Text>
Copyright © 2009–2015. All rights reserved.