Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
FileReader.h
Go to the documentation of this file.
1
2
// 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 FILEREADER_H
8
#define FILEREADER_H
9
10
#include "
Reader.h
"
11
12
namespace
Lucene
{
13
15
class
LPPAPI
FileReader
:
public
Reader
{
16
public
:
18
FileReader
(
const
String& fileName);
19
virtual
~FileReader
();
20
21
LUCENE_CLASS
(
FileReader
);
22
23
protected
:
24
ifstreamPtr
file
;
25
int64_t
_length
;
26
ByteArray
fileBuffer
;
27
28
public
:
29
static
const
int32_t
FILE_EOF
;
30
static
const
int32_t
FILE_ERROR
;
31
32
public
:
34
virtual
int32_t
read
();
35
37
virtual
int32_t
read
(
wchar_t
* buffer, int32_t offset, int32_t
length
);
38
40
virtual
void
close
();
41
43
virtual
bool
markSupported
();
44
46
virtual
void
reset
();
47
49
virtual
int64_t
length
();
50
};
51
52
}
53
54
#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Reader.h
Lucene::FileReader::read
virtual int32_t read()
Read a single character.
Lucene::FileReader::file
ifstreamPtr file
Definition
FileReader.h:24
Lucene::FileReader::~FileReader
virtual ~FileReader()
Lucene::FileReader::FILE_EOF
static const int32_t FILE_EOF
Definition
FileReader.h:29
Lucene::FileReader::read
virtual int32_t read(wchar_t *buffer, int32_t offset, int32_t length)
Read characters into a portion of an array.
Lucene::FileReader::length
virtual int64_t length()
The number of bytes in the file.
Lucene::FileReader::FileReader
FileReader(const String &fileName)
Creates a new FileReader, given the file name to read from.
Lucene::FileReader::fileBuffer
ByteArray fileBuffer
Definition
FileReader.h:26
Lucene::FileReader::FILE_ERROR
static const int32_t FILE_ERROR
Definition
FileReader.h:30
Lucene::FileReader::markSupported
virtual bool markSupported()
Tell whether this stream supports the mark() operation.
Lucene::FileReader::close
virtual void close()
Close the stream.
Lucene::FileReader::reset
virtual void reset()
Reset the stream.
Lucene::FileReader::_length
int64_t _length
Definition
FileReader.h:25
Lucene::Reader::Reader
Reader()
Lucene
Definition
AbstractAllTermDocs.h:12
clucene.sourceforge.net