Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
FileReader.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 FILEREADER_H
8
#define FILEREADER_H
9
10
#include "
Reader.h
"
11
12
namespace
Lucene
13
{
15
class
LPPAPI
FileReader
:
public
Reader
16
{
17
public
:
19
FileReader
(
const
String& fileName);
20
virtual
~
FileReader
();
21
22
LUCENE_CLASS
(
FileReader
);
23
24
protected
:
25
ifstreamPtr file;
26
int64_t
_length
;
27
ByteArray
fileBuffer
;
28
29
public
:
30
static
const
int32_t
FILE_EOF
;
31
static
const
int32_t
FILE_ERROR
;
32
33
public
:
35
virtual
int32_t read();
36
38
virtual
int32_t read(
wchar_t
* buffer, int32_t offset, int32_t length);
39
41
virtual
void
close();
42
44
virtual
bool
markSupported();
45
47
virtual
void
reset();
48
50
virtual
int64_t length();
51
};
52
}
53
54
#endif
clucene.sourceforge.net