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


lucene::store::IndexOutput Class Reference

Abstract class for output to a file in a Directory. More...

#include <IndexOutput.h>

Inheritance diagram for lucene::store::IndexOutput:

lucene::store::BufferedIndexOutput

Public Member Functions

 IndexOutput ()
virtual ~IndexOutput ()
virtual void writeByte (const uint8_t b)=0
 Writes a single byte.
virtual void writeBytes (const uint8_t *b, const int32_t length)=0
 Writes an array of bytes.
void writeInt (const int32_t i)
 Writes an int as four bytes.
void writeVInt (const int32_t vi)
 Writes an int in a variable-length format.
void writeLong (const int64_t i)
 Writes a long as eight bytes.
void writeVLong (const int64_t vi)
 Writes an long in a variable-length format.
void writeString (const TCHAR *s, const int32_t length)
 Writes a string.
void writeChars (const TCHAR *s, const int32_t start, const int32_t length)
 Writes a sequence of UTF-8 encoded characters from a string.
virtual void close ()=0
 Closes this stream to further operations.
virtual int64_t getFilePointer () const =0
 Returns the current position in this file, where the next write will occur.
virtual void seek (const int64_t pos)=0
 Sets current position in this file, where the next write will occur.
virtual int64_t length () const =0
 The number of bytes in the file.
virtual void flush ()=0
 Forces any buffered output to be written.
void copyBytes (lucene::store::IndexInput *input, int64_t numBytes)
 Copy numBytes bytes from input to ourself.

Detailed Description

Abstract class for output to a file in a Directory.

A random-access output stream. Used for all Lucene index output operations.

See also:
Directory

IndexInput


Constructor & Destructor Documentation

lucene::store::IndexOutput::IndexOutput (  ) 

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


Member Function Documentation

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

Writes a single byte.

See also:
IndexInput::readByte()

Implemented in lucene::store::BufferedIndexOutput.

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

Writes an array of bytes.

Parameters:
b the bytes to write
length the number of bytes to write
See also:
IndexInput::readBytes(uint8_t*,int32_t)

Implemented in lucene::store::BufferedIndexOutput.

void lucene::store::IndexOutput::writeInt ( const int32_t  i  ) 

Writes an int as four bytes.

See also:
IndexInput::readInt()

void lucene::store::IndexOutput::writeVInt ( const int32_t  vi  ) 

Writes an int in a variable-length format.

Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

See also:
IndexInput::readVInt()

void lucene::store::IndexOutput::writeLong ( const int64_t  i  ) 

Writes a long as eight bytes.

See also:
IndexInput::readLong()

void lucene::store::IndexOutput::writeVLong ( const int64_t  vi  ) 

Writes an long in a variable-length format.

Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

See also:
IndexInput::readVLong()

void lucene::store::IndexOutput::writeString ( const TCHAR *  s,
const int32_t  length 
)

Writes a string.

See also:
IndexInput::readString()

void lucene::store::IndexOutput::writeChars ( const TCHAR *  s,
const int32_t  start,
const int32_t  length 
)

Writes a sequence of UTF-8 encoded characters from a string.

Parameters:
s the source of the characters
start the first character in the sequence
length the number of characters in the sequence
See also:
IndexInput::readChars(char[],int32_t,int32_t)

virtual void lucene::store::IndexOutput::close (  )  [pure virtual]

Closes this stream to further operations.

Implemented in lucene::store::BufferedIndexOutput.

virtual int64_t lucene::store::IndexOutput::getFilePointer (  )  const [pure virtual]

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

See also:
seek(long)

Implemented in lucene::store::BufferedIndexOutput.

virtual void lucene::store::IndexOutput::seek ( const int64_t  pos  )  [pure virtual]

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

See also:
getFilePointer()

Implemented in lucene::store::BufferedIndexOutput.

virtual int64_t lucene::store::IndexOutput::length (  )  const [pure virtual]

The number of bytes in the file.

Implemented in lucene::store::BufferedIndexOutput.

virtual void lucene::store::IndexOutput::flush (  )  [pure virtual]

Forces any buffered output to be written.

Implemented in lucene::store::BufferedIndexOutput.

void lucene::store::IndexOutput::copyBytes ( lucene::store::IndexInput input,
int64_t  numBytes 
)

Copy numBytes bytes from input to ourself.


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

clucene.sourceforge.net