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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ByteSliceReader.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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  {
18  public:
20  virtual ~ByteSliceReader();
21 
23 
24  public:
26  int32_t bufferUpto;
27  ByteArray buffer;
28  int32_t upto;
29  int32_t limit;
30  int32_t level;
31  int32_t bufferOffset;
32  int32_t endIndex;
33 
34  public:
35  void init(ByteBlockPoolPtr pool, int32_t startIndex, int32_t endIndex);
36  bool eof();
37 
39  virtual uint8_t readByte();
40 
41  int64_t writeTo(IndexOutputPtr out);
42 
43  void nextSlice();
44 
46  virtual void readBytes(uint8_t* b, int32_t offset, int32_t length);
47 
49  virtual int64_t getFilePointer();
50 
52  virtual int64_t length();
53 
55  virtual void seek(int64_t pos);
56 
58  virtual void close();
59  };
60 }
61 
62 #endif

clucene.sourceforge.net