activemq-cpp-3.8.2
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 
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 
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_ */
An InputStreamReader is a bridge from byte streams to character streams.
Definition: InputStreamReader.h:42
A base class that must be implemented by all classes wishing to provide a class that reads in a strea...
Definition: InputStream.h:39
Definition: Reader.h:40
#define DECAF_API
Definition: Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25