org.elasticsearch.common.compress
Class CompressorFactory

java.lang.Object
  extended by org.elasticsearch.common.compress.CompressorFactory

public class CompressorFactory
extends Object


Constructor Summary
CompressorFactory()
           
 
Method Summary
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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressorFactory

public CompressorFactory()
Method Detail

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.