Qore Programming Language Reference Manual  1.2.0
QC_InputStreamLineIterator.dox.h
1 namespace Qore {
4 
19 
20 public:
22 
40  constructor(Qore::InputStream is, *string encoding, *string eol, bool trim = True, int bufsize = DefaultStreamBufferSize);
41 
42 public:
44 
54  constructor(Qore::StreamReader sr, *string eol, bool trim = True);
55 
56 public:
58 
68 string getEncoding();
69 
70 public:
72 
89 string getLine();
90 
91 public:
93 
101 
102 public:
104 
121 string getValue();
122 
123 public:
125 
137 int index();
138 
139 public:
141 
154 bool next();
155 
156 public:
158 
169 bool valid();
170 };
171 }
This class defines an abstract interface for line iterators.
Definition: QC_AbstractLineIterator.dox.h:8
This class defines an abstract interface for input streams.
Definition: QC_InputStream.dox.h:19
This class defines a line iterator for input streams.
Definition: QC_InputStreamLineIterator.dox.h:18
constructor(Qore::StreamReader sr, *string eol, bool trim=True)
Creates the InputStreamLineIterator for iterating data from the given StreamReader.
bool next()
Moves the current position to the next line in the data; returns False if there are no more lines to ...
string getEncoding()
Returns the character encoding for the InputStreamLineIterator.
constructor(Qore::InputStream is, *string encoding, *string eol, bool trim=True, int bufsize=DefaultStreamBufferSize)
Creates a buffered InputStreamLineIterator object for iterating over the given InputStream.
string getLine()
Returns the current line in the data or throws an ITERATOR-ERROR exception if the iterator is invalid...
string getValue()
Returns the current line in the data or throws an ITERATOR-ERROR exception if the iterator is invalid...
int index()
Returns the current iterator line number in the data (the first line is line 1) or 0 if not pointing ...
bool valid()
Returns True if the iterator is currently pointing at a valid element, False if not.
StreamReader getStreamReader()
Returns the StreamReader object used internally.
This class defines a stream reader for input streams.
Definition: QC_StreamReader.dox.h:18
const DefaultStreamBufferSize
The default buffer size for the BufferedStreamReader class.
Definition: QC_BufferedStreamReader.dox.h:35
const True
logical True
Definition: qc_qore.dox.h:98
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...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3