activemq-cpp-3.8.2
DataInput.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_DATAINPUT_H_
19 #define _DECAF_IO_DATAINPUT_H_
20 
21 #include <decaf/util/Config.h>
22 
23 #include <vector>
24 #include <string>
25 
26 #include <decaf/io/IOException.h>
27 #include <decaf/io/EOFException.h>
31 
32 namespace decaf {
33 namespace io {
34 
52  public:
53 
54  virtual ~DataInput();
55 
65  virtual bool readBoolean() = 0;
66 
76  virtual char readByte() = 0;
77 
87  virtual unsigned char readUnsignedByte() = 0;
88 
99  virtual char readChar() = 0;
100 
112  virtual double readDouble() = 0;
113 
125  virtual float readFloat() = 0;
126 
140  virtual int readInt() = 0;
141 
163  virtual long long readLong() = 0;
164 
176  virtual short readShort() = 0;
177 
190  virtual unsigned short readUnsignedShort() = 0;
191 
201  virtual std::string readString() = 0;
202 
222  virtual std::string readLine() = 0;
223 
239  virtual std::string readUTF() = 0;
240 
269  virtual void readFully(unsigned char* buffer, int size) = 0;
270 
302  virtual void readFully(unsigned char* buffer, int size, int offset, int length) = 0;
303 
319  virtual long long skipBytes(long long num) = 0;
320 
321  };
322 
323 }}
324 
325 #endif /* _DECAF_IO_DATAINPUT_H_ */
The DataInput interface provides for reading bytes from a binary stream and reconstructing from them ...
Definition: DataInput.h:51
#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