org.elasticsearch.common.compress
Class CompressorFactory
java.lang.Object
org.elasticsearch.common.compress.CompressorFactory
public class CompressorFactory
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompressorFactory
public CompressorFactory()
configure
public static void configure(Settings settings)
setDefaultCompressor
public static void setDefaultCompressor(Compressor defaultCompressor)
defaultCompressor
public static Compressor defaultCompressor()
isCompressed
public static boolean isCompressed(BytesReference bytes)
isCompressed
public static boolean isCompressed(byte[] data)
isCompressed
public static boolean isCompressed(byte[] data,
int offset,
int length)
isCompressed
public static boolean isCompressed(org.apache.lucene.store.IndexInput in)
throws IOException
- Throws:
IOException
compressor
@Nullable
public static Compressor compressor(BytesReference bytes)
compressor
@Nullable
public static Compressor compressor(byte[] data)
compressor
@Nullable
public static Compressor compressor(byte[] data,
int offset,
int length)
compressor
@Nullable
public static Compressor compressor(org.jboss.netty.buffer.ChannelBuffer buffer)
compressor
@Nullable
public static Compressor compressor(org.apache.lucene.store.IndexInput in)
throws IOException
- Throws:
IOException
compressor
public static Compressor compressor(String type)
uncompressIfNeeded
public static BytesReference uncompressIfNeeded(BytesReference bytes)
throws IOException
- Uncompress the provided data, data can be detected as compressed using
isCompressed(byte[], int, int)
.
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.