activemq-cpp-3.9.5
InputStreamReader.h
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef _DECAF_IO_INPUTSTREAMREADER_H_
19
#define _DECAF_IO_INPUTSTREAMREADER_H_
20
21
#include <
decaf/util/Config.h
>
22
#include <
decaf/io/Reader.h
>
23
24
namespace
decaf
{
25
namespace
io {
26
27
class
InputStream;
28
42
class
DECAF_API
InputStreamReader
:
public
Reader
{
43
private
:
44
45
// The target InputStream
46
InputStream
* stream;
47
48
// Does this instance own the InputStream
49
bool
own;
50
51
// Has the reader been closed.
52
bool
closed;
53
54
private
:
55
56
InputStreamReader
(
const
InputStreamReader
&);
57
InputStreamReader
& operator=(
const
InputStreamReader
&);
58
59
public
:
60
71
InputStreamReader
(
InputStream
* stream,
bool
own =
false
);
72
73
virtual
~InputStreamReader
();
74
75
virtual
void
close
();
76
77
virtual
bool
ready
()
const
;
78
79
protected
:
80
81
virtual
int
doReadArrayBounded
(
char
* buffer,
int
size,
int
offset,
int
length);
82
83
virtual
void
checkClosed
()
const
;
84
85
};
86
87
}}
88
89
#endif
/* _DECAF_IO_INPUTSTREAMREADER_H_ */
Reader.h
decaf::io::InputStream
A base class that must be implemented by all classes wishing to provide a class that reads in a strea...
Definition:
InputStream.h:39
decaf::io::InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams.
Definition:
InputStreamReader.h:42
decaf::io::InputStreamReader::InputStreamReader
InputStreamReader(InputStream *stream, bool own=false)
Create a new InputStreamReader that wraps the given InputStream.
decaf::io::InputStreamReader::ready
virtual bool ready() const
Tells whether this stream is ready to be read.
decaf::io::InputStreamReader::checkClosed
virtual void checkClosed() const
decaf::io::InputStreamReader::~InputStreamReader
virtual ~InputStreamReader()
decaf::io::InputStreamReader::doReadArrayBounded
virtual int doReadArrayBounded(char *buffer, int size, int offset, int length)
Override this method to customize the functionality of the method read( unsigned char* buffer,...
decaf::io::InputStreamReader::close
virtual void close()
Closes this object and deallocates the appropriate resources.
decaf::io::Reader
Definition:
Reader.h:40
Config.h
DECAF_API
#define DECAF_API
Definition:
Config.h:29
decaf
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition:
AprPool.h:25
src
main
decaf
io
InputStreamReader.h
Generated on Thu Feb 4 2021 00:00:00 for activemq-cpp-3.9.5 by
1.9.2