File: Poco.BinaryReader.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (203 lines) | stat: -rw-r--r-- 12,574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::BinaryReader</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="symbol">class BinaryReader</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Streams<br />
<b>Header:</b> Poco/BinaryReader.h</p>
<h2>Description</h2>
<div class="description">
<p>This class reads basic types in binary form into an input stream. It provides an extractor-based interface similar to istream. The reader also supports automatic conversion from big-endian (network byte order) to little-endian and vice-versa. Use a <a href="Poco.BinaryWriter.html" title="class Poco::BinaryWriter">BinaryWriter</a> to create a stream suitable for a <a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a>. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.BinaryReader.html#3862" title="Poco::BinaryReader::bad()">bad</a>, <a href="Poco.BinaryReader.html#3865" title="Poco::BinaryReader::byteOrder()">byteOrder</a>, <a href="Poco.BinaryReader.html#3863" title="Poco::BinaryReader::eof()">eof</a>, <a href="Poco.BinaryReader.html#3861" title="Poco::BinaryReader::fail()">fail</a>, <a href="Poco.BinaryReader.html#3860" title="Poco::BinaryReader::good()">good</a>, <a href="Poco.BinaryReader.html#3819" title="Poco::BinaryReader::operator >>()">operator&nbsp;&gt;&gt;</a>, <a href="Poco.BinaryReader.html#3849" title="Poco::BinaryReader::read7BitEncoded()">read7BitEncoded</a>, <a href="Poco.BinaryReader.html#3859" title="Poco::BinaryReader::readBOM()">readBOM</a>, <a href="Poco.BinaryReader.html#3853" title="Poco::BinaryReader::readRaw()">readRaw</a>, <a href="Poco.BinaryReader.html#3864" title="Poco::BinaryReader::stream()">stream</a></p>
<h2>Enumerations</h2>
<h3><a name="3809">StreamByteOrder</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="3810">NATIVE_BYTE_ORDER</a> = 1</p>
<div class="description">
<p>the host's native byte-order </p>
</div>
<p class="decl"><a name="3811">BIG_ENDIAN_BYTE_ORDER</a> = 2</p>
<div class="description">
<p>big-endian (network) byte-order </p>
</div>
<p class="decl"><a name="3812">NETWORK_BYTE_ORDER</a> = 2</p>
<div class="description">
<p>big-endian (network) byte-order </p>
</div>
<p class="decl"><a name="3813">LITTLE_ENDIAN_BYTE_ORDER</a> = 3</p>
<div class="description">
<p>little-endian byte-order </p>
</div>
<p class="decl"><a name="3814">UNSPECIFIED_BYTE_ORDER</a> = 4</p>
<div class="description">
<p>unknown, byte-order will be determined by reading the byte-order mark </p>
</div>
<h2>Constructors</h2>
<h3><a name="3815">BinaryReader</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::istream &amp; istr,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.BinaryReader.html#3809" title="enum  Poco::BinaryReader::StreamByteOrder">StreamByteOrder</a> byteOrder = NATIVE_BYTE_ORDER<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="3818">~BinaryReader</a></h3>
<p class="decl">~<a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="3862">bad</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool bad();</p>
<div class="description">
<p>Returns _istr.<a href="Poco.BinaryReader.html#3862" title="Poco::BinaryReader::bad()">bad</a>(); </p>
</div>
<h3><a name="3865">byteOrder</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.BinaryReader.html#3809" title="enum  Poco::BinaryReader::StreamByteOrder">StreamByteOrder</a> byteOrder() const;</p>
<div class="description">
<p>Returns the byte-order used by the reader, which is either <a href="Poco.BinaryReader.html#3811" title="Poco::BinaryReader::BIG_ENDIAN_BYTE_ORDER">BIG_ENDIAN_BYTE_ORDER</a> or <a href="Poco.BinaryReader.html#3813" title="Poco::BinaryReader::LITTLE_ENDIAN_BYTE_ORDER">LITTLE_ENDIAN_BYTE_ORDER</a>. </p>
</div>
<h3><a name="3863">eof</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool eof();</p>
<div class="description">
<p>Returns _istr.<a href="Poco.BinaryReader.html#3863" title="Poco::BinaryReader::eof()">eof</a>(); </p>
</div>
<h3><a name="3861">fail</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool fail();</p>
<div class="description">
<p>Returns _istr.<a href="Poco.BinaryReader.html#3861" title="Poco::BinaryReader::fail()">fail</a>(); </p>
</div>
<h3><a name="3860">good</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool good();</p>
<div class="description">
<p>Returns _istr.<a href="Poco.BinaryReader.html#3860" title="Poco::BinaryReader::good()">good</a>(); </p>
</div>
<h3><a name="3819">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;bool &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3821">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;char &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3823">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned char &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3825">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;signed char &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3827">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;short &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3829">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned short &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3831">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;int &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3833">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned int &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3835">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;long &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3837">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned long &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3839">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;float &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3841">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;double &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3843">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11357" title="Poco::Int64">Int64</a> &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3845">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11358" title="Poco::UInt64">UInt64</a> &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3847">operator &gt;&gt;</a></h3>
<p class="decl"><a href="Poco.BinaryReader.html" title="class Poco::BinaryReader">BinaryReader</a> &amp; operator &gt;&gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; value<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3849">read7BitEncoded</a></h3>
<p class="decl">void read7BitEncoded(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11354" title="Poco::UInt32">UInt32</a> &amp; value<br />);</p>
<div class="description">
<p>Reads a 32-bit unsigned integer in compressed format. See <a href="Poco.BinaryWriter.html#3910" title="Poco::BinaryWriter::write7BitEncoded()">BinaryWriter::write7BitEncoded</a>() for a description of the compression algorithm. </p>
</div>
<h3><a name="3851">read7BitEncoded</a></h3>
<p class="decl">void read7BitEncoded(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11358" title="Poco::UInt64">UInt64</a> &amp; value<br />);</p>
<div class="description">
<p>Reads a 64-bit unsigned integer in compressed format. See <a href="Poco.BinaryWriter.html#3910" title="Poco::BinaryWriter::write7BitEncoded()">BinaryWriter::write7BitEncoded</a>() for a description of the compression algorithm. </p>
</div>
<h3><a name="3859">readBOM</a></h3>
<p class="decl">void readBOM();</p>
<div class="description">
<p>Reads a byte-order mark from the stream and configures the reader for the encountered byte order. A byte-order mark is a 16-bit integer with a value of 0xFEFF, written in host byte order. </p>
</div>
<h3><a name="3853">readRaw</a></h3>
<p class="decl">void readRaw(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::streamsize length,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; value<br />);</p>
<div class="description">
<p>Reads length bytes of raw data into value. </p>
</div>
<h3><a name="3856">readRaw</a></h3>
<p class="decl">void readRaw(<br />&nbsp;&nbsp;&nbsp;&nbsp;char * buffer,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::streamsize length<br />);</p>
<div class="description">
<p>Reads length bytes of raw data into buffer. </p>
</div>
<h3><a name="3864">stream</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::istream &amp; stream() const;</p>
<div class="description">
<p>Returns the underlying stream. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>