CLucene - a full-featured, c++ search engine
API Documentation
Abstract base class for input from a file in a Directory. More...
#include <IndexInput.h>
Public Member Functions | |
| virtual | ~BufferedIndexInput () |
| virtual IndexInput * | clone () const =0 |
| void | close () |
| Closes the stream to futher operations. | |
| uint8_t | readByte () |
| Reads and returns a single byte. | |
| void | readBytes (uint8_t *b, const int32_t len) |
| Reads a specified number of bytes into an array at the specified offset. | |
| int64_t | getFilePointer () const |
| Returns the current position in this file, where the next read will occur. | |
| void | seek (const int64_t pos) |
| Sets current position in this file, where the next read will occur. | |
Protected Member Functions | |
| BufferedIndexInput (const BufferedIndexInput &clone) | |
| Returns a clone of this stream. | |
| BufferedIndexInput (int32_t bufferSize=lucene::store::BufferedIndexOutput::BUFFER_SIZE) | |
| virtual void | readInternal (uint8_t *b, const int32_t len)=0 |
| Expert: implements buffer refill. | |
| virtual void | seekInternal (const int64_t pos)=0 |
| Expert: implements seek. | |
Protected Attributes | |
| int32_t | bufferSize |
| int64_t | bufferStart |
| int32_t | bufferLength |
| int32_t | bufferPosition |
Abstract base class for input from a file in a Directory.
A random-access input stream. Used for all Lucene index input operations.
| lucene::store::BufferedIndexInput::BufferedIndexInput | ( | const BufferedIndexInput & | clone | ) | [protected] |
Returns a clone of this stream.
Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.
Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.
| lucene::store::BufferedIndexInput::BufferedIndexInput | ( | int32_t | bufferSize = lucene::store::BufferedIndexOutput::BUFFER_SIZE |
) | [protected] |
| virtual lucene::store::BufferedIndexInput::~BufferedIndexInput | ( | ) | [virtual] |
| virtual IndexInput* lucene::store::BufferedIndexInput::clone | ( | ) | const [pure virtual] |
Implements lucene::store::IndexInput.
Implemented in lucene::store::RAMIndexInput.
| void lucene::store::BufferedIndexInput::close | ( | ) | [virtual] |
Closes the stream to futher operations.
Implements lucene::store::IndexInput.
Reimplemented in lucene::store::RAMIndexInput.
| int64_t lucene::store::BufferedIndexInput::getFilePointer | ( | ) | const [virtual] |
Returns the current position in this file, where the next read will occur.
Implements lucene::store::IndexInput.
| uint8_t lucene::store::BufferedIndexInput::readByte | ( | ) | [inline, virtual] |
Reads and returns a single byte.
Implements lucene::store::IndexInput.
| void lucene::store::BufferedIndexInput::readBytes | ( | uint8_t * | b, | |
| const int32_t | len | |||
| ) | [virtual] |
Reads a specified number of bytes into an array at the specified offset.
| b | the array to read bytes into | |
| offset | the offset in the array to start storing bytes | |
| len | the number of bytes to read |
Implements lucene::store::IndexInput.
| virtual void lucene::store::BufferedIndexInput::readInternal | ( | uint8_t * | b, | |
| const int32_t | len | |||
| ) | [protected, pure virtual] |
Expert: implements buffer refill.
Reads bytes from the current position in the input.
| b | the array to read bytes into | |
| offset | the offset in the array to start storing bytes | |
| length | the number of bytes to read |
Implemented in lucene::store::RAMIndexInput.
| void lucene::store::BufferedIndexInput::seek | ( | const int64_t | pos | ) | [virtual] |
Sets current position in this file, where the next read will occur.
Implements lucene::store::IndexInput.
| virtual void lucene::store::BufferedIndexInput::seekInternal | ( | const int64_t | pos | ) | [protected, pure virtual] |
Expert: implements seek.
Sets current position in this file, where the next readInternal(byte[],int32_t,int32_t) will occur.
Implemented in lucene::store::RAMIndexInput.
int32_t lucene::store::BufferedIndexInput::bufferLength [protected] |
int32_t lucene::store::BufferedIndexInput::bufferPosition [protected] |
int32_t lucene::store::BufferedIndexInput::bufferSize [protected] |
int64_t lucene::store::BufferedIndexInput::bufferStart [protected] |