public class CompressedString extends Object implements Streamable
| Constructor and Description |
|---|
CompressedString(byte[] compressed)
Constructor assuming the data provided is compressed (UTF8).
|
CompressedString(byte[] data,
int offset,
int length)
Constructs a new compressed string, assuming the bytes are UTF8, by copying it over.
|
CompressedString(BytesReference data) |
CompressedString(String str) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compressed() |
boolean |
equals(Object o) |
int |
hashCode() |
static CompressedString |
readCompressedString(StreamInput in) |
void |
readFrom(StreamInput in) |
String |
string() |
String |
toString() |
byte[] |
uncompressed() |
void |
writeTo(StreamOutput out) |
public CompressedString(byte[] compressed)
public CompressedString(BytesReference data) throws IOException
IOExceptionpublic CompressedString(byte[] data,
int offset,
int length)
throws IOException
data - The byte arrayoffset - Offset into the byte arraylength - The length of the dataIOExceptionpublic CompressedString(String str) throws IOException
IOExceptionpublic byte[] compressed()
public byte[] uncompressed()
throws IOException
IOExceptionpublic String string() throws IOException
IOExceptionpublic static CompressedString readCompressedString(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionCopyright © 2009–2015. All rights reserved.