public class CompressorFactory
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static Compressor |
COMPRESSOR |
| Constructor | Description |
|---|---|
CompressorFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
static Compressor |
compressor(BytesReference bytes) |
|
static boolean |
isCompressed(BytesReference bytes) |
|
static BytesReference |
uncompress(BytesReference bytes) |
Decompress the provided
BytesReference. |
static BytesReference |
uncompressIfNeeded(BytesReference bytes) |
Uncompress the provided data, data can be detected as compressed using
isCompressed(BytesReference). |
public static final Compressor COMPRESSOR
public static boolean isCompressed(BytesReference bytes)
@Nullable public static Compressor compressor(BytesReference bytes)
public static BytesReference uncompressIfNeeded(BytesReference bytes) throws java.io.IOException
isCompressed(BytesReference).java.lang.NullPointerException - a NullPointerException will be thrown when bytes is nulljava.io.IOExceptionpublic static BytesReference uncompress(BytesReference bytes) throws java.io.IOException
BytesReference.java.io.IOException