|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Text
Text represents a (usually) long text data. We use this abstraction instead of String
so we can represent it in a more optimized manner in memory as well as serializing it over the
network as well as converting it to json format.
Method Summary | |
---|---|
BytesReference |
bytes()
The UTF8 bytes representing the the text, might be converted on the fly, see hasBytes() |
boolean |
hasBytes()
Are bytes available without the need to be converted into bytes when calling bytes() . |
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. |
Method Detail |
---|
boolean hasBytes()
bytes()
.
BytesReference bytes()
hasBytes()
boolean hasString()
String
representation of the text. If not, then it hasBytes()
.
String string()
String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |