activemq-cpp-3.6.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
DataInputStream.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_DATAINPUTSTREAM_H_
19
#define _DECAF_IO_DATAINPUTSTREAM_H_
20
21
#include <
decaf/io/FilterInputStream.h
>
22
#include <
decaf/io/IOException.h
>
23
#include <
decaf/io/EOFException.h
>
24
#include <
decaf/io/UTFDataFormatException.h
>
25
#include <
decaf/lang/exceptions/NullPointerException.h
>
26
#include <
decaf/lang/exceptions/IndexOutOfBoundsException.h
>
27
28
namespace
decaf{
29
namespace
io{
30
46
class
DECAF_API
DataInputStream
:
public
FilterInputStream
{
47
private
:
48
49
// Buffer used to store bytes read from the stream while reconstructed into
50
// higher order C++ primitives.
51
unsigned
char
buffer[8];
52
53
private
:
54
55
DataInputStream
(
const
DataInputStream
&);
56
DataInputStream
& operator=(
const
DataInputStream
&);
57
58
public
:
59
67
DataInputStream
(
InputStream
* inputStream,
bool
own =
false
);
68
69
virtual
~
DataInputStream
();
70
71
public
:
72
// DataInput
73
83
virtual
bool
readBoolean();
84
94
virtual
char
readByte();
95
105
virtual
unsigned
char
readUnsignedByte();
106
117
virtual
char
readChar();
118
130
virtual
double
readDouble();
131
143
virtual
float
readFloat();
144
158
virtual
int
readInt();
159
181
virtual
long
long
readLong();
182
194
virtual
short
readShort();
195
208
virtual
unsigned
short
readUnsignedShort();
209
219
virtual
std::string readString();
220
240
virtual
std::string readLine();
241
257
virtual
std::string readUTF();
258
287
virtual
void
readFully(
unsigned
char
* buffer,
int
size);
288
320
virtual
void
readFully(
unsigned
char
* buffer,
int
size,
int
offset,
int
length);
321
337
virtual
long
long
skipBytes(
long
long
num);
338
339
private
:
340
341
// Used internally to reliably get data from the underlying stream
342
void
readAllData(
unsigned
char
* buffer,
int
length);
343
344
};
345
346
}}
347
348
#endif
/*_DECAF_IO_DATAINPUTSTREAM_H_*/
src
main
decaf
io
DataInputStream.h
Generated on Mon Mar 4 2013 10:25:46 for activemq-cpp-3.6.0 by
1.8.1.2