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
IOException
public CompressedString(byte[] data, int offset, int length) throws IOException
IOException
public CompressedString(byte[] data) throws IOException
IOException
public CompressedString(String str) throws IOException
IOException
public byte[] compressed()
public byte[] uncompressed()
public String string() throws IOException
IOException
public static CompressedString readCompressedString(StreamInput in) throws IOException
IOException
public void writeTo(StreamOutput out) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.