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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

ByteSliceReader.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef BYTESLICEREADER_H
8 #define BYTESLICEREADER_H
9
10 #include "IndexInput.h"
11
12 namespace Lucene {
13
16 class ByteSliceReader : public IndexInput {
17 public:
18 ByteSliceReader();
19 virtual ~ByteSliceReader();
20
21 LUCENE_CLASS(ByteSliceReader);
22
23 public:
24 ByteBlockPoolPtr pool;
25 int32_t bufferUpto;
26 ByteArray buffer;
27 int32_t upto;
28 int32_t limit;
29 int32_t level;
30 int32_t bufferOffset;
31 int32_t endIndex;
32
33 public:
34 void init(const ByteBlockPoolPtr& pool, int32_t startIndex, int32_t endIndex);
35 bool eof();
36
38 virtual uint8_t readByte();
39
40 int64_t writeTo(const IndexOutputPtr& out);
41
42 void nextSlice();
43
45 virtual void readBytes(uint8_t* b, int32_t offset, int32_t length);
46
48 virtual int64_t getFilePointer();
49
51 virtual int64_t length();
52
54 virtual void seek(int64_t pos);
55
57 virtual void close();
58 };
59
60 }
61
62 #endif
Lucene::ByteSliceReader::bufferOffset
int32_t bufferOffset
Definition: ByteSliceReader.h:30
Lucene::ByteSliceReader::writeTo
int64_t writeTo(const IndexOutputPtr &out)
Lucene::IndexOutputPtr
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition: LuceneTypes.h:494
IndexInput.h
Lucene::ByteSliceReader::eof
bool eof()
Lucene::ByteSliceReader::pool
ByteBlockPoolPtr pool
Definition: ByteSliceReader.h:21
Lucene::ByteSliceReader::close
virtual void close()
Not implemented.
Lucene::ByteSliceReader::bufferUpto
int32_t bufferUpto
Definition: ByteSliceReader.h:25
Lucene::ByteBlockPoolPtr
boost::shared_ptr< ByteBlockPool > ByteBlockPoolPtr
Definition: LuceneTypes.h:89
Lucene::ByteSliceReader::seek
virtual void seek(int64_t pos)
Not implemented.
Lucene::ByteSliceReader::level
int32_t level
Definition: ByteSliceReader.h:29
Lucene::ByteSliceReader::length
virtual int64_t length()
Not implemented.
Lucene::ByteSliceReader::ByteSliceReader
ByteSliceReader()
Lucene::ByteSliceReader::readByte
virtual uint8_t readByte()
Reads and returns a single byte.
Lucene::ByteSliceReader::upto
int32_t upto
Definition: ByteSliceReader.h:27
Lucene::ByteSliceReader::init
void init(const ByteBlockPoolPtr &pool, int32_t startIndex, int32_t endIndex)
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::ByteSliceReader::getFilePointer
virtual int64_t getFilePointer()
Not implemented.
Lucene::ByteSliceReader
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.
Definition: ByteSliceReader.h:16
Lucene::ByteSliceReader::readBytes
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.
Lucene::ByteSliceReader::~ByteSliceReader
virtual ~ByteSliceReader()
Lucene::ByteSliceReader::nextSlice
void nextSlice()
Lucene::ByteSliceReader::limit
int32_t limit
Definition: ByteSliceReader.h:28
Lucene::IndexInput
Abstract base class for input from a file in a Directory. A random-access input stream. Used for all Lucene index input operations.
Definition: IndexInput.h:17
Lucene::ByteSliceReader::endIndex
int32_t endIndex
Definition: ByteSliceReader.h:31
Lucene::ByteSliceReader::buffer
ByteArray buffer
Definition: ByteSliceReader.h:26

clucene.sourceforge.net