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

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
Lucene::ByteSliceReader Class Reference

IndexInput that knows how to read the byte slices written by Posting and PostingVector. We read the bytes in each slice until we hit the end of that slice at which point we read the forwarding address of the next slice and then jump to it. More...

`#include <ByteSliceReader.h>`

Inheritance diagram for Lucene::ByteSliceReader:

## Public Member Functions

| ByteSliceReader ()
virtual | ~ByteSliceReader ()
virtual String | getClassName ()
boost::shared_ptr< ByteSliceReader > | shared_from_this ()
void | init (const ByteBlockPoolPtr &pool, int32_t startIndex, int32_t endIndex)
bool | eof ()
virtual uint8_t | readByte ()
| Reads and returns a single byte.
int64_t | writeTo (const IndexOutputPtr &out)
void | nextSlice ()
virtual void | readBytes (uint8_t *b, int32_t offset, int32_t length)
| Reads a specified number of bytes into an array at the specified offset.
virtual int64_t | getFilePointer ()
| Not implemented.
virtual int64_t | length ()
| Not implemented.
virtual void | seek (int64_t pos)
| Not implemented.
virtual void | close ()
| Not implemented.
Public Member Functions inherited from Lucene::IndexInput
| IndexInput ()
virtual | ~IndexInput ()
boost::shared_ptr< IndexInput > | shared_from_this ()
virtual void | readBytes (uint8_t *b, int32_t offset, int32_t length, bool useBuffer)
| Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only `BufferedIndexInput` respects this parameter.
virtual int32_t | readInt ()
| Reads four bytes and returns an int.
virtual int32_t | readVInt ()
| Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.
virtual int64_t | readLong ()
| Reads eight bytes and returns a int64.
virtual int64_t | readVLong ()
| Reads a int64 stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.
virtual void | setModifiedUTF8StringsMode ()
| Call this if readString should read characters stored in the old modified UTF8 format. This is used for indices written pre-2.4.
virtual String | readString ()
| Reads a string.
virtual String | readModifiedUTF8String ()
| Reads a modified UTF8 format string.
virtual int32_t | readChars (wchar_t *buffer, int32_t start, int32_t length)
| Reads Lucene's old "modified UTF-8" encoded characters into an array.
virtual void | skipChars (int32_t length)

Similar to `readChars(wchar_t*, int32_t, int32_t)` but does not do any conversion operations on the bytes it is reading in. It still has to invoke `readByte()` just as `readChars(wchar_t*, int32_t, int32_t)` does, but it does not need a buffer to store anything and it does not have to do any of the bitwise operations, since we don't actually care what is in the byte except to determine how many more bytes to read.

virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())
| Returns a clone of this stream.
virtual MapStringString | readStringStringMap ()
| Read string map as a series of key/value pairs.
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed.
virtual int32_t | hashCode ()
| Return hash code for this object.
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal.
virtual int32_t | compareTo (const LuceneObjectPtr &other)
| Compare two objects.
virtual String | toString ()
| Returns a string representation of the object.
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock.
virtual LuceneSignalPtr | getSignal ()
| Return this object signal.
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout.
virtual void | unlock ()
| Unlock this object.
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread.
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout.
virtual void | notifyAll ()
| Notify all threads waiting for signal.

## Static Public Member Functions

static String | _getClassName ()
Static Public Member Functions inherited from Lucene::IndexInput
static String | _getClassName ()

## Data Fields

ByteBlockPoolPtr | pool
int32_t | bufferUpto
ByteArray | buffer
int32_t | upto
int32_t | limit
int32_t | level
int32_t | bufferOffset
int32_t | endIndex

## Additional Inherited Members

Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()
Protected Attributes inherited from Lucene::IndexInput
bool | preUTF8Strings
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

IndexInput that knows how to read the byte slices written by Posting and PostingVector. We read the bytes in each slice until we hit the end of that slice at which point we read the forwarding address of the next slice and then jump to it.

## Constructor & Destructor Documentation

## ◆ ByteSliceReader()

Lucene::ByteSliceReader::ByteSliceReader | ( |  | ) |

Referenced by _getClassName().

## ◆ ~ByteSliceReader()

virtual Lucene::ByteSliceReader::~ByteSliceReader | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

String Lucene::ByteSliceReader::_getClassName | ( |  | ) |

inline static

References ByteSliceReader().

## ◆ close()

virtual void Lucene::ByteSliceReader::close | ( |  | ) |

virtual

Not implemented.

Implements Lucene::IndexInput.

## ◆ eof()

bool Lucene::ByteSliceReader::eof | ( |  | ) |

## ◆ getClassName()

virtual String Lucene::ByteSliceReader::getClassName | ( |  | ) |

inline virtual

Reimplemented from Lucene::IndexInput.

## ◆ getFilePointer()

virtual int64_t Lucene::ByteSliceReader::getFilePointer | ( |  | ) |

virtual

Not implemented.

Implements Lucene::IndexInput.

## ◆ init()

void Lucene::ByteSliceReader::init | ( | const ByteBlockPoolPtr & | pool,
|  | int32_t | startIndex,
|  | int32_t | endIndex )

References endIndex, and pool.

## ◆ length()

virtual int64_t Lucene::ByteSliceReader::length | ( |  | ) |

virtual

Not implemented.

Implements Lucene::IndexInput.

Referenced by readBytes().

## ◆ nextSlice()

void Lucene::ByteSliceReader::nextSlice | ( |  | ) |

## ◆ readByte()

virtual uint8_t Lucene::ByteSliceReader::readByte | ( |  | ) |

virtual

Reads and returns a single byte.

Implements Lucene::IndexInput.

## ◆ readBytes()

virtual void Lucene::ByteSliceReader::readBytes | ( | uint8_t * | b,
|  | int32_t | offset,
|  | int32_t | length )

virtual

Reads a specified number of bytes into an array at the specified offset.

Implements Lucene::IndexInput.

References length().

## ◆ seek()

virtual void Lucene::ByteSliceReader::seek | ( | int64_t | pos | ) |

virtual

Not implemented.

Implements Lucene::IndexInput.

## ◆ shared_from_this()

boost::shared_ptr< ByteSliceReader > Lucene::ByteSliceReader::shared_from_this | ( |  | ) |

inline

## ◆ writeTo()

int64_t Lucene::ByteSliceReader::writeTo | ( | const IndexOutputPtr & | out | ) |

## Field Documentation

## ◆ buffer

ByteArray Lucene::ByteSliceReader::buffer

## ◆ bufferOffset

int32_t Lucene::ByteSliceReader::bufferOffset

## ◆ bufferUpto

int32_t Lucene::ByteSliceReader::bufferUpto

## ◆ endIndex

int32_t Lucene::ByteSliceReader::endIndex

Referenced by init().

## ◆ level

int32_t Lucene::ByteSliceReader::level

## ◆ limit

int32_t Lucene::ByteSliceReader::limit

## ◆ pool

ByteBlockPoolPtr Lucene::ByteSliceReader::pool

Referenced by init().

## ◆ upto

int32_t Lucene::ByteSliceReader::upto

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

- ByteSliceReader.h

clucene.sourceforge.net