CLucene - a full-featured, c++ search engine
API Documentation


lucene::store::BufferedIndexOutput Class Reference

Base implementation class for buffered IndexOutput. More...

#include <IndexOutput.h>

Inheritance diagram for lucene::store::BufferedIndexOutput:
lucene::store::IndexOutput lucene::debug::LuceneBase lucene::store::RAMIndexOutput

List of all members.

Public Member Functions

 LUCENE_STATIC_CONSTANT (int32_t, BUFFER_SIZE=LUCENE_STREAM_BUFFER_SIZE)
 BufferedIndexOutput ()
virtual ~BufferedIndexOutput ()
virtual void writeByte (const uint8_t b)
 Writes a single byte.
virtual void writeBytes (const uint8_t *b, const int32_t length)
 Writes an array of bytes.
virtual void close ()
 Closes this stream to further operations.
int64_t getFilePointer () const
 Returns the current position in this file, where the next write will occur.
virtual void seek (const int64_t pos)
 Sets current position in this file, where the next write will occur.
virtual int64_t length ()=0
 The number of bytes in the file.
void flush ()
 Forces any buffered output to be written.

Protected Member Functions

virtual void flushBuffer (const uint8_t *b, const int32_t len)=0
 Expert: implements buffer write.

Detailed Description

Base implementation class for buffered IndexOutput.


Constructor & Destructor Documentation

lucene::store::BufferedIndexOutput::BufferedIndexOutput (  ) 
virtual lucene::store::BufferedIndexOutput::~BufferedIndexOutput (  )  [virtual]

Member Function Documentation

virtual void lucene::store::BufferedIndexOutput::close (  )  [virtual]

Closes this stream to further operations.

Implements lucene::store::IndexOutput.

Reimplemented in lucene::store::RAMIndexOutput.

void lucene::store::BufferedIndexOutput::flush (  )  [virtual]

Forces any buffered output to be written.

Implements lucene::store::IndexOutput.

virtual void lucene::store::BufferedIndexOutput::flushBuffer ( const uint8_t *  b,
const int32_t  len 
) [protected, pure virtual]

Expert: implements buffer write.

Writes bytes at the current position in the output.

Parameters:
b the bytes to write
len the number of bytes to write

Implemented in lucene::store::RAMIndexOutput.

int64_t lucene::store::BufferedIndexOutput::getFilePointer (  )  const [virtual]

Returns the current position in this file, where the next write will occur.

See also:
seek(long)

Implements lucene::store::IndexOutput.

virtual int64_t lucene::store::BufferedIndexOutput::length (  )  [pure virtual]

The number of bytes in the file.

Implements lucene::store::IndexOutput.

Implemented in lucene::store::RAMIndexOutput.

lucene::store::BufferedIndexOutput::LUCENE_STATIC_CONSTANT ( int32_t  ,
BUFFER_SIZE  = LUCENE_STREAM_BUFFER_SIZE 
)
virtual void lucene::store::BufferedIndexOutput::seek ( const int64_t  pos  )  [virtual]

Sets current position in this file, where the next write will occur.

See also:
getFilePointer()

Implements lucene::store::IndexOutput.

Reimplemented in lucene::store::RAMIndexOutput.

virtual void lucene::store::BufferedIndexOutput::writeByte ( const uint8_t  b  )  [virtual]

Writes a single byte.

See also:
IndexInput::readByte()

Implements lucene::store::IndexOutput.

virtual void lucene::store::BufferedIndexOutput::writeBytes ( const uint8_t *  b,
const int32_t  length 
) [virtual]

Writes an array of bytes.

Parameters:
b the bytes to write
length the number of bytes to write
See also:
IndexInput::readBytes(byte[],int32_t,int32_t)

Implements lucene::store::IndexOutput.


The documentation for this class was generated from the following file:

clucene.sourceforge.net