org.elasticsearch.common.lucene.store
Class BufferedChecksumIndexOutput

java.lang.Object
  extended by org.apache.lucene.store.DataOutput
      extended by org.apache.lucene.store.IndexOutput
          extended by org.apache.lucene.store.OpenBufferedIndexOutput
              extended by org.elasticsearch.common.lucene.store.BufferedChecksumIndexOutput
All Implemented Interfaces:
Closeable

public class BufferedChecksumIndexOutput
extends OpenBufferedIndexOutput


Field Summary
 
Fields inherited from class org.apache.lucene.store.OpenBufferedIndexOutput
DEFAULT_BUFFER_SIZE
 
Constructor Summary
BufferedChecksumIndexOutput(org.apache.lucene.store.IndexOutput out, Checksum digest)
           
 
Method Summary
 void close()
          Closes this stream to further operations.
 Checksum digest()
           
 void flush()
          Forces any buffered output to be written.
protected  void flushBuffer(byte[] b, int offset, int len)
          Expert: implements buffer write.
 long length()
          The number of bytes in the file.
 void seek(long pos)
          Sets current position in this file, where the next write will occur.
 void setLength(long length)
           
 String toString()
           
 org.apache.lucene.store.IndexOutput underlying()
           
 
Methods inherited from class org.apache.lucene.store.OpenBufferedIndexOutput
getFilePointer, writeByte, writeBytes
 
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferedChecksumIndexOutput

public BufferedChecksumIndexOutput(org.apache.lucene.store.IndexOutput out,
                                   Checksum digest)
Method Detail

digest

public Checksum digest()

underlying

public org.apache.lucene.store.IndexOutput underlying()

close

public void close()
           throws IOException
Description copied from class: OpenBufferedIndexOutput
Closes this stream to further operations.

Specified by:
close in interface Closeable
Overrides:
close in class OpenBufferedIndexOutput
Throws:
IOException

flushBuffer

protected void flushBuffer(byte[] b,
                           int offset,
                           int len)
                    throws IOException
Description copied from class: OpenBufferedIndexOutput
Expert: implements buffer write. Writes bytes at the current position in the output.

Specified by:
flushBuffer in class OpenBufferedIndexOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
len - the number of bytes to write
Throws:
IOException

flush

public void flush()
           throws IOException
Description copied from class: OpenBufferedIndexOutput
Forces any buffered output to be written.

Overrides:
flush in class OpenBufferedIndexOutput
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Description copied from class: OpenBufferedIndexOutput
Sets current position in this file, where the next write will occur.

Overrides:
seek in class OpenBufferedIndexOutput
Throws:
IOException
See Also:
OpenBufferedIndexOutput.getFilePointer()

length

public long length()
            throws IOException
Description copied from class: OpenBufferedIndexOutput
The number of bytes in the file.

Specified by:
length in class OpenBufferedIndexOutput
Throws:
IOException

setLength

public void setLength(long length)
               throws IOException
Overrides:
setLength in class org.apache.lucene.store.IndexOutput
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012. All Rights Reserved.