DCL
3.7.4
Loading...
Searching...
No Matches
FileInputStream.h
Go to the documentation of this file.
1
#ifndef __DCL_FILE_INPUT_STREAM_H__
2
#define __DCL_FILE_INPUT_STREAM_H__ 20071009
3
4
#ifndef __DCL_INPUT_STREAM_H__
5
#include <
dcl/InputStream.h
>
6
#endif
7
#ifndef __DCL_FILE_H__
8
#include <
dcl/File.h
>
9
#endif
10
11
__DCL_BEGIN_NAMESPACE
12
22
class
DCLCAPI
FileInputStream :
public
InputStream
23
{
24
DECLARE_CLASSINFO
(FileInputStream)
25
public
:
29
virtual
String
toString
()
const
;
30
37
FileInputStream(
const
String& _path)
38
__DCL_THROWS1
(
IOException
*);
39
40
#ifdef _MSC_VER
41
FileInputStream(
const
wchar_t
* _path)
42
__DCL_THROWS1
(
IOException
*);
43
#endif
44
49
FileInputStream(
File
&
__noclose__
_file)
50
__DCL_THROWS1
(
IOException
*);
51
56
FileInputStream(File::HandleType
__noclose__
_handle)
57
__DCL_THROWS1
(
IOException
*);
58
62
void
open(
const
String& _path)
63
__DCL_THROWS1
(
IOException
*);
64
69
virtual
~FileInputStream();
70
74
virtual
void
close()
75
__DCL_THROWS1
(
IOException
*);
76
81
virtual
size_t
available()
const
82
__DCL_THROWS1
(
IOException
*);
83
#if 0
84
virtual
size_t
peek(
void
* p,
size_t
n)
85
__DCL_THROWS1
(
IOException
*);
86
#endif
87
/*
88
* 스트림으로부터 데이터를 읽는다.
89
* @param _buf
90
* 버퍼
91
* @param _n
92
* 버퍼의 크기가 _n바이트
93
* @return
94
* 읽은 바이트의 수이다. 0이면 EOF이다.
95
*/
96
virtual
size_t
read(
void
* _buf,
size_t
_n)
97
__DCL_THROWS1
(
IOException
*);
98
99
protected
:
100
File
*
__file
;
101
bool
__closeDestroy
;
102
103
byte_t
*
__buf
;
104
size_t
__bufSize
;
105
const
byte_t
*
__cacheStart
;
106
size_t
__cacheSize
;
107
108
void
init
(
File
* _file);
109
__DCL_THROWS1
(
IOException
*);
110
};
111
112
__DCL_END_NAMESPACE
113
114
#endif
// __DCL_FILE_INPUT_STREAM_H__
115
DCLCAPI
#define DCLCAPI
Definition
Config.h:95
byte_t
unsigned char byte_t
Definition
Config.h:246
__noclose__
#define __noclose__
Definition
Config.h:331
__DCL_THROWS1
#define __DCL_THROWS1(e)
Definition
Config.h:152
File.h
InputStream.h
DECLARE_CLASSINFO
#define DECLARE_CLASSINFO(class_name)
Definition
Object.h:227
File
Definition
File.h:42
FileInputStream::__DCL_THROWS1
__DCL_THROWS1(IOException *)
FileInputStream::__file
File * __file
Definition
FileInputStream.h:100
FileInputStream::__cacheStart
const byte_t * __cacheStart
Definition
FileInputStream.h:105
FileInputStream::__closeDestroy
bool __closeDestroy
Definition
FileInputStream.h:101
FileInputStream::__cacheSize
size_t __cacheSize
Definition
FileInputStream.h:106
FileInputStream::__buf
byte_t * __buf
Definition
FileInputStream.h:103
FileInputStream::__bufSize
size_t __bufSize
Definition
FileInputStream.h:104
FileInputStream::init
void init(File *_file)
Definition
FileInputStream.cpp:58
IOException
Definition
Exception.h:93
InputStream
Definition
InputStream.h:23
Object::toString
virtual String toString() const
Definition
Object.cpp:187
include
dcl
FileInputStream.h
Generated by
1.14.0