Qore Programming Language Reference Manual  1.0.8
QC_StreamReader.dox.h
1 namespace Qore {
4 
18 class StreamReader {
19 
20 public:
22 
25  constructor(Qore::InputStream is, *string encoding);
26 
27 public:
29 
34 string getEncoding();
35 
36 public:
38 
45 
46 public:
48 
61 *binary readBinary(int limit = -1);
62 
63 public:
65 
79 *string readLine(*string eol, bool trim = True);
80 
81 public:
83 
98 *string readString(int limit = -1);
99 
100 public:
102 
113 int readi1();
114 
115 public:
117 
128 int readi2();
129 
130 public:
132 
143 int readi2LSB();
144 
145 public:
147 
158 int readi4();
159 
160 public:
162 
173 int readi4LSB();
174 
175 public:
177 
188 int readi8();
189 
190 public:
192 
203 int readi8LSB();
204 
205 public:
207 
218 int readu1();
219 
220 public:
222 
233 int readu2();
234 
235 public:
237 
248 int readu2LSB();
249 
250 public:
252 
263 int readu4();
264 
265 public:
267 
278 int readu4LSB();
279 };
280 }
int readi4LSB()
Reads a 4-byte (32 bit) signed integer from the input stream in binary little-endian format...
int readu4LSB()
Reads a 4-byte (32 bit) unsigned integer from the input stream in binary little-endian format...
int readi8()
Reads a 8-byte (64 bit) signed integer from the input stream in binary big-endian format...
int readu4()
Reads a 4-byte (32 bit) unsigned integer from the input stream in binary big-endian format...
int readu2()
Reads a 2-byte (16 bit) unsigned integer from the input stream in binary big-endian format...
string trim(string str, *string chars)
Removes byte characters from the start and end of a string and returns the new string (also see the t...
const True
logical True
Definition: qc_qore.dox.h:98
*string readLine(*string eol, bool trim=True)
Reads a text line from the input stream.
int readi8LSB()
Reads a 8-byte (64 bit) signed integer from the input stream in binary little-endian format...
binary binary()
Always returns an empty binary object (of zero length)
int readi2()
Reads a 2-byte (16 bit) signed integer from the input stream in binary big-endian format...
string getEncoding()
Returns the character encoding for the StreamReader.
int readi2LSB()
Reads a 2-byte (16 bit) signed integer from the input stream in binary little-endian format...
int readi4()
Reads a 4-byte (32 bit) signed integer from the input stream in binary big-endian format...
This class defines a stream reader for input streams.
Definition: QC_StreamReader.dox.h:18
*string readString(int limit=-1)
Reads a string from the input stream.
int readu1()
Reads a 1-byte unsigned integer from the input stream.
constructor(Qore::InputStream is, *string encoding)
Creates the StreamReader for reading data from the given InputStream.
int readu2LSB()
Reads a 2-byte (16 bit) unsigned integer from the input stream in binary little-endian format...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
*binary readBinary(int limit=-1)
Reads binary data from the input stream up to a given limit.
This class defines an abstract interface for input streams.
Definition: QC_InputStream.dox.h:19
InputStream getInputStream()
Returns the InputStream for the StreamReader.
int readi1()
Reads a 1-byte signed integer from the input stream.