DCL
4.0
Loading...
Searching...
No Matches
InputStreamReader.h
Go to the documentation of this file.
1
#ifndef __DCL_INPUT_STREAM_READER_H__
2
#define __DCL_INPUT_STREAM_READER_H__ 20110130
3
4
#ifndef __DCL_READER_H__
5
#include <
dcl/Reader.h
>
6
#endif
7
#ifndef __DCL_INPUT_STREAM_H__
8
#include <
dcl/InputStream.h
>
9
#endif
10
11
__DCL_BEGIN_NAMESPACE
12
22
23
class
CharsetDecoder
;
24
25
class
DCLCAPI
InputStreamReader
:
public
Reader
26
{
27
DECLARE_CLASSINFO
(
InputStreamReader
)
28
protected
:
32
InputStreamReader
();
33
34
public
:
38
virtual
String
toString
()
const
;
39
50
InputStreamReader
(
51
InputStream
&
__noclose__
_input,
52
CharsetDecoder
& _decoder
53
);
54
64
InputStreamReader
(
65
InputStream
*
__destroy__
_pInput,
// new InputStream
66
CharsetDecoder
*
__destroy__
_pDecoder =
NULL
// new CharsetDecoder
67
)
__DCL_THROWS1
(
IOException
*);
68
73
virtual
~InputStreamReader
();
74
78
virtual
void
close
()
79
__DCL_THROWS1
(
IOException
*);
80
89
virtual
size_t
read
(
wchar_t
* _buf,
size_t
_n)
90
__DCL_THROWS1
(
IOException
*);
91
92
protected:
93
InputStream
*
__input
;
94
CharsetDecoder
*
__decoder
;
95
bool
__closeDestroy
;
96
97
private:
98
#define __EXTRA_MAX 16
// cf. MB_LEN_MAX
99
byte_t
__extra[
__EXTRA_MAX
];
100
size_t
__extraBytes;
101
};
102
103
__DCL_END_NAMESPACE
104
105
#endif
// __DCL_INPUT_STREAM_READER_H__
NULL
#define NULL
Definition
Config.h:340
__destroy__
#define __destroy__
Definition
Config.h:363
DCLCAPI
#define DCLCAPI
Definition
Config.h:100
byte_t
unsigned char byte_t
Definition
Config.h:274
__noclose__
#define __noclose__
Definition
Config.h:360
__DCL_THROWS1
#define __DCL_THROWS1(e)
Definition
Config.h:167
InputStream.h
__EXTRA_MAX
#define __EXTRA_MAX
Definition
InputStreamReader.h:98
DECLARE_CLASSINFO
#define DECLARE_CLASSINFO(class_name)
Definition
Object.h:210
Reader.h
CharsetDecoder
Definition
Charset.h:107
IOException
Definition
Exception.h:93
InputStream
Definition
InputStream.h:23
InputStreamReader::close
virtual void close() __DCL_THROWS1(IOException *)
Definition
InputStreamReader.cpp:87
InputStreamReader::__decoder
CharsetDecoder * __decoder
Definition
InputStreamReader.h:94
InputStreamReader::toString
virtual String toString() const
InputStreamReader::InputStreamReader
InputStreamReader(InputStream &__noclose__ _input, CharsetDecoder &_decoder)
Definition
InputStreamReader.cpp:47
InputStreamReader::read
virtual size_t read(wchar_t *_buf, size_t _n) __DCL_THROWS1(IOException *)
Definition
InputStreamReader.cpp:119
InputStreamReader::__input
InputStream * __input
Definition
InputStreamReader.h:93
InputStreamReader::__closeDestroy
bool __closeDestroy
Definition
InputStreamReader.h:95
Reader
Definition
Reader.h:25
include
dcl
InputStreamReader.h
Generated by
1.14.0