Class CompressorFactory
- java.lang.Object
-
- org.elasticsearch.common.compress.CompressorFactory
-
public class CompressorFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static Compressor
COMPRESSOR
-
Constructor Summary
Constructors Constructor Description CompressorFactory()
-
Method Summary
Modifier and Type Method Description static Compressor
compressor(BytesReference bytes)
static boolean
isCompressed(BytesReference bytes)
static BytesReference
uncompress(BytesReference bytes)
Decompress the providedBytesReference
.static BytesReference
uncompressIfNeeded(BytesReference bytes)
Uncompress the provided data, data can be detected as compressed usingisCompressed(BytesReference)
.
-
-
-
Field Detail
-
COMPRESSOR
public static final Compressor COMPRESSOR
-
-
Method Detail
-
isCompressed
public static boolean isCompressed(BytesReference bytes)
-
compressor
@Nullable public static Compressor compressor(BytesReference bytes)
-
uncompressIfNeeded
public static BytesReference uncompressIfNeeded(BytesReference bytes) throws java.io.IOException
Uncompress the provided data, data can be detected as compressed usingisCompressed(BytesReference)
.- Throws:
java.lang.NullPointerException
- a NullPointerException will be thrown when bytes is nulljava.io.IOException
-
uncompress
public static BytesReference uncompress(BytesReference bytes) throws java.io.IOException
Decompress the providedBytesReference
.- Throws:
java.io.IOException
-
-