public final class CompressedString extends Object
String class except that it internally stores
data using a compressed representation in order to require less permanent
memory. Note that the compressed string might still sometimes need to be
decompressed in order to perform equality checks or to compute hash codes.| Constructor and Description |
|---|
CompressedString(byte[] data) |
CompressedString(byte[] data,
int offset,
int length) |
CompressedString(BytesReference data) |
CompressedString(String str) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compressed()
Return the compressed bytes.
|
boolean |
equals(Object o) |
int |
hashCode() |
static CompressedString |
readCompressedString(StreamInput in) |
String |
string() |
String |
toString() |
byte[] |
uncompressed()
Return the uncompressed bytes.
|
void |
writeTo(StreamOutput out) |
public CompressedString(BytesReference data) throws IOException
IOExceptionpublic CompressedString(byte[] data,
int offset,
int length)
throws IOException
IOExceptionpublic CompressedString(byte[] data)
throws IOException
IOExceptionpublic CompressedString(String str) throws IOException
IOExceptionpublic byte[] compressed()
public byte[] uncompressed()
public String string() throws IOException
IOExceptionpublic static CompressedString readCompressedString(StreamInput in) throws IOException
IOExceptionpublic void writeTo(StreamOutput out) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.