org.elasticsearch.common.compress
Class CompressedIndexOutput<T extends CompressorContext>
java.lang.Object
org.apache.lucene.store.DataOutput
org.apache.lucene.store.IndexOutput
org.elasticsearch.common.compress.CompressedIndexOutput<T>
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- LZFCompressedIndexOutput, SnappyCompressedIndexOutput
public abstract class CompressedIndexOutput<T extends CompressorContext>
- extends org.apache.lucene.store.IndexOutput
Method Summary |
void |
close()
|
protected abstract void |
compress(byte[] data,
int offset,
int len,
org.apache.lucene.store.IndexOutput out)
Compresses the data into the output |
void |
copyBytes(org.apache.lucene.store.DataInput input,
long length)
|
protected abstract void |
doClose()
|
void |
flush()
|
long |
getFilePointer()
|
long |
length()
|
void |
seek(long pos)
|
org.apache.lucene.store.IndexOutput |
underlying()
|
void |
writeByte(byte b)
|
void |
writeBytes(byte[] input,
int offset,
int length)
|
protected abstract void |
writeHeader(org.apache.lucene.store.IndexOutput out)
|
Methods inherited from class org.apache.lucene.store.IndexOutput |
setLength |
Methods inherited from class org.apache.lucene.store.DataOutput |
writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected final T extends CompressorContext context
uncompressed
protected byte[] uncompressed
uncompressedLength
protected int uncompressedLength
CompressedIndexOutput
public CompressedIndexOutput(org.apache.lucene.store.IndexOutput out,
T context)
throws IOException
- Throws:
IOException
underlying
public org.apache.lucene.store.IndexOutput underlying()
writeByte
public void writeByte(byte b)
throws IOException
- Specified by:
writeByte
in class org.apache.lucene.store.DataOutput
- Throws:
IOException
writeBytes
public void writeBytes(byte[] input,
int offset,
int length)
throws IOException
- Specified by:
writeBytes
in class org.apache.lucene.store.DataOutput
- Throws:
IOException
copyBytes
public void copyBytes(org.apache.lucene.store.DataInput input,
long length)
throws IOException
- Overrides:
copyBytes
in class org.apache.lucene.store.DataOutput
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in class org.apache.lucene.store.IndexOutput
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class org.apache.lucene.store.IndexOutput
- Throws:
IOException
doClose
protected abstract void doClose()
throws IOException
- Throws:
IOException
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in class org.apache.lucene.store.IndexOutput
seek
public void seek(long pos)
throws IOException
- Specified by:
seek
in class org.apache.lucene.store.IndexOutput
- Throws:
IOException
length
public long length()
throws IOException
- Specified by:
length
in class org.apache.lucene.store.IndexOutput
- Throws:
IOException
writeHeader
protected abstract void writeHeader(org.apache.lucene.store.IndexOutput out)
throws IOException
- Throws:
IOException
compress
protected abstract void compress(byte[] data,
int offset,
int len,
org.apache.lucene.store.IndexOutput out)
throws IOException
- Compresses the data into the output
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.