public class CompressorFactory extends Object
Constructor and Description |
---|
CompressorFactory() |
Modifier and Type | Method and Description |
---|---|
static Compressor |
compressor(byte[] data) |
static Compressor |
compressor(byte[] data,
int offset,
int length) |
static Compressor |
compressor(BytesReference bytes) |
static Compressor |
compressor(org.jboss.netty.buffer.ChannelBuffer buffer) |
static Compressor |
compressor(org.apache.lucene.store.IndexInput in) |
static Compressor |
compressor(String type) |
static void |
configure(Settings settings) |
static Compressor |
defaultCompressor() |
static boolean |
isCompressed(byte[] data) |
static boolean |
isCompressed(byte[] data,
int offset,
int length) |
static boolean |
isCompressed(BytesReference bytes) |
static boolean |
isCompressed(org.apache.lucene.store.IndexInput in) |
static void |
setDefaultCompressor(Compressor defaultCompressor) |
static BytesReference |
uncompressIfNeeded(BytesReference bytes)
Uncompress the provided data, data can be detected as compressed using
isCompressed(byte[], int, int) . |
public static void configure(Settings settings)
public static void setDefaultCompressor(Compressor defaultCompressor)
public static Compressor defaultCompressor()
public static boolean isCompressed(BytesReference bytes)
public static boolean isCompressed(byte[] data)
public static boolean isCompressed(byte[] data, int offset, int length)
public static boolean isCompressed(org.apache.lucene.store.IndexInput in) throws IOException
IOException
@Nullable public static Compressor compressor(BytesReference bytes)
@Nullable public static Compressor compressor(byte[] data)
@Nullable public static Compressor compressor(byte[] data, int offset, int length)
@Nullable public static Compressor compressor(org.jboss.netty.buffer.ChannelBuffer buffer)
@Nullable public static Compressor compressor(org.apache.lucene.store.IndexInput in) throws IOException
IOException
public static Compressor compressor(String type)
public static BytesReference uncompressIfNeeded(BytesReference bytes) throws IOException
isCompressed(byte[], int, int)
.IOException
Copyright © 2009–2015. All rights reserved.