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