\doxysection{Qore\+::Input\+Stream\+Line\+Iterator Class Reference}
\hypertarget{class_qore_1_1_input_stream_line_iterator}{}\label{class_qore_1_1_input_stream_line_iterator}\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}


This class defines a line iterator for input streams.  




{\ttfamily \#include $<$QC\+\_\+\+Input\+Stream\+Line\+Iterator.\+dox.\+h$>$}



Inheritance diagram for Qore\+::Input\+Stream\+Line\+Iterator\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=242pt]{class_qore_1_1_input_stream_line_iterator__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_a731660843719ceaaa5a2aee2c97a58a5}{constructor}} (\mbox{\hyperlink{class_qore_1_1_input_stream}{Qore\+::\+Input\+Stream}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{is}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{eol}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{group__string__functions_gae8d314e819a299d46d181696600d4293}{trim}}=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bufsize}}=\mbox{\hyperlink{group___buffered_stream_reader_ga5a70489b1e5c32585eb23e2a4423c8f9}{Default\+Stream\+Buffer\+Size}})
\begin{DoxyCompactList}\small\item\em Creates a buffered \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator} object for iterating over the given {\ttfamily \doxylink{class_qore_1_1_input_stream}{Input\+Stream}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_a0be69bb1eacbf7614fe211f58a95bdd9}{constructor}} (\mbox{\hyperlink{class_qore_1_1_stream_reader}{Qore\+::\+Stream\+Reader}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{sr}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{eol}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{group__string__functions_gae8d314e819a299d46d181696600d4293}{trim}}=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}})
\begin{DoxyCompactList}\small\item\em Creates the \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator} for iterating data from the given {\ttfamily \doxylink{class_qore_1_1_stream_reader}{Stream\+Reader}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_a305448b7ff5c235f98cf932158e575af}{get\+Encoding}} ()
\begin{DoxyCompactList}\small\item\em Returns the \doxylink{character_encoding}{character encoding} for the \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_a97843613b1efffb8191a982b034ad35e}{get\+Line}} ()
\begin{DoxyCompactList}\small\item\em Returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_stream_reader}{Stream\+Reader}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_ae6d45c5c3375e246ebf6e8657d16ae07}{get\+Stream\+Reader}} ()
\begin{DoxyCompactList}\small\item\em Returns the \doxylink{class_qore_1_1_stream_reader}{Stream\+Reader} object used internally. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_ac20e677f7b65af6efcad994e8baffcf0}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em Returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_ac2a16a29cd14271505149e96c144c814}{index}} ()
\begin{DoxyCompactList}\small\item\em Returns the current iterator line number in the data (the first line is line 1) or 0 if not pointing at a valid element. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_a15869ee0a81ae224334f83f681b6e760}{next}} ()
\begin{DoxyCompactList}\small\item\em Moves the current position to the next line in the data; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more lines to read; if the iterator is not pointing at a valid element before this call, the iterator will be positioned to the beginning of the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_input_stream_line_iterator_ad67679ac159cec3362a5faed21f0dcdb}{valid}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator}{Qore\+::\+Abstract\+Line\+Iterator}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_a8ad4c0503f09b24e93bbeac266f2b2a0}{get\+Line}} ()
\begin{DoxyCompactList}\small\item\em Returns the current line in the data or throws an {\ttfamily INVALID-\/\+ITERATOR} exception if the iterator is invalid. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_a6e572b42827159c979e52eedd5485015}{get\+Split\+Line}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{sep}}, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{quote}}, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{eol}}="{}\textbackslash{}n"{}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{trim\+\_\+unquoted}}=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Returns the current line and splits the string into a list of components based on a separator string and a quote character. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_acc1342afce2820c3d1dded7aeb2b8dd8}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em Returns the current line in the data or throws an {\ttfamily INVALID-\/\+ITERATOR} exception if the iterator is invalid. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_acde61f19ac0b96adcaafbe4962e9a335}{index}} ()
\begin{DoxyCompactList}\small\item\em Returns the current iterator line number (the first line is line 1) or 0 if not pointing at a valid element. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_ac5f7742a325b335f3cd2ab0bb5f37272}{next}} ()
\begin{DoxyCompactList}\small\item\em Moves the current position to the next line; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more lines to read. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_a06fc51d01bfae9f17f290ac247ffd3f3}{valid}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_qore_1_1_abstract_iterator}{Qore\+::\+Abstract\+Iterator}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} \mbox{\hyperlink{class_qore_1_1_abstract_iterator_aa01374b285003faa21b045082063ac12}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em returns the current value \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_iterator_ab10d5694cc2fcd3b6689ea7494da79de}{next}} ()
\begin{DoxyCompactList}\small\item\em Moves the current position to the next element; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more elements. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_iterator_aee1def5d872b487b8917a166d9b263e8}{valid}} ()
\begin{DoxyCompactList}\small\item\em returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class defines a line iterator for input streams. 

\begin{DoxySince}{Since}
Qore 0.\+8.\+13
\end{DoxySince}
\begin{DoxyParagraph}{Example\+: Input\+Stream\+Line\+Iterator basic usage}

\begin{DoxyCode}{0}
\DoxyCodeLine{FileInputStream\ fis(\textcolor{stringliteral}{"{}log.txt"{}});}
\DoxyCodeLine{InputStreamLineIterator\ it(fis,\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (it.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}line\ \%d\ =\ \%n\(\backslash\)n"{}},\ it.index(),\ it.getLine());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1_data_line_iterator}{Qore\+::\+Data\+Line\+Iterator} 

\doxylink{class_qore_1_1_file_line_iterator}{Qore\+::\+File\+Line\+Iterator} 
\end{DoxySeeAlso}


\doxysubsection{Member Function Documentation}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_a731660843719ceaaa5a2aee2c97a58a5}\label{class_qore_1_1_input_stream_line_iterator_a731660843719ceaaa5a2aee2c97a58a5} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Qore\+::\+Input\+Stream\+Line\+Iterator\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_input_stream}{Qore\+::\+Input\+Stream}}}]{is,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{eol,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}}}]{trim = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}},  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{bufsize = {\ttfamily \mbox{\hyperlink{group___buffered_stream_reader_ga5a70489b1e5c32585eb23e2a4423c8f9}{Default\+Stream\+Buffer\+Size}}} }\end{DoxyParamCaption})}



Creates a buffered \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator} object for iterating over the given {\ttfamily \doxylink{class_qore_1_1_input_stream}{Input\+Stream}}. 


\begin{DoxyParams}{Parameters}
{\em is} & the {\ttfamily \doxylink{class_qore_1_1_input_stream}{Input\+Stream}} to iterate over \\
\hline
{\em encoding} & character encoding of the data from input stream; if not ASCII-\/compatible, all data will be converted to UTF-\/8; if not present, the \doxysectlink{character_encoding_default_encoding}{default character encoding}{1} is assumed \\
\hline
{\em eol} & the optional end of line character(s) to use to detect lines in the data; if this string is not passed, then if the character-\/encoding is ASCII-\/compatible, the end of line character(s) are detected automatically from {\ttfamily "{}\textbackslash{}n"{}}, {\ttfamily "{}\textbackslash{}r"{}}, or {\ttfamily "{}\textbackslash{}r\textbackslash{}n"{}}; if the stream uses a non-\/\+ASCII-\/compatible character encoding, then {\ttfamily "{}\textbackslash{}n"{}} is assumed \\
\hline
{\em trim} & if \doxysectlink{basic_data_types_True}{True}{2} the string return values for the lines iterated will be trimmed of the eol bytes \\
\hline
{\em bufsize} & the size of the buffer for the internal \doxylink{class_qore_1_1_buffered_stream_reader}{Buffered\+Stream\+Reader} in bytes; must be a positive integer\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em STREAM-\/\+BUFFER-\/\+ERROR} & an invalid stream buffer size was specified; the buffer size must be a positive integer \\
\hline
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & this exception could be thrown if the eol argument has a different \doxylink{character_encoding}{character encoding} from the data\textquotesingle{}s and an error occurs during encoding conversion\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
this variant of the \doxylink{class_qore_1_1_input_stream_line_iterator_a731660843719ceaaa5a2aee2c97a58a5}{Input\+Stream\+Line\+Iterator\+::constructor} creates a \doxylink{class_qore_1_1_buffered_stream_reader}{Buffered\+Stream\+Reader} to read the input data 
\end{DoxyNote}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_a0be69bb1eacbf7614fe211f58a95bdd9}\label{class_qore_1_1_input_stream_line_iterator_a0be69bb1eacbf7614fe211f58a95bdd9} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Qore\+::\+Input\+Stream\+Line\+Iterator\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_stream_reader}{Qore\+::\+Stream\+Reader}}}]{sr,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{eol,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}}}]{trim = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})}



Creates the \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator} for iterating data from the given {\ttfamily \doxylink{class_qore_1_1_stream_reader}{Stream\+Reader}}. 


\begin{DoxyParams}{Parameters}
{\em sr} & the {\ttfamily \doxylink{class_qore_1_1_stream_reader}{Stream\+Reader}} used as a source of data to iterate over \\
\hline
{\em eol} & the optional end of line character(s) to use to detect lines in the data; if this string is not passed, then if the character-\/encoding is ASCII-\/compatible, the end of line character(s) are detected automatically from {\ttfamily "{}\textbackslash{}n"{}}, {\ttfamily "{}\textbackslash{}r"{}}, or {\ttfamily "{}\textbackslash{}r\textbackslash{}n"{}}; if the stream uses a non-\/\+ASCII-\/compatible character encoding, then {\ttfamily "{}\textbackslash{}n"{}} is assumed \\
\hline
{\em trim} & if \doxysectlink{basic_data_types_True}{True}{2} the string return values for the lines iterated will be trimmed of the eol bytes\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & this exception could be thrown if the eol argument has a different \doxylink{character_encoding}{character encoding} from the data\textquotesingle{}s and an error occurs during encoding conversion \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_a305448b7ff5c235f98cf932158e575af}\label{class_qore_1_1_input_stream_line_iterator_a305448b7ff5c235f98cf932158e575af} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!getEncoding@{getEncoding}}
\index{getEncoding@{getEncoding}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{getEncoding()}{getEncoding()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::get\+Encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \doxylink{character_encoding}{character encoding} for the \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator}. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ encoding\ =\ i.getEncoding();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the \doxylink{character_encoding}{character encoding} for the \doxylink{class_qore_1_1_input_stream_line_iterator}{Input\+Stream\+Line\+Iterator} 
\end{DoxyReturn}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_a97843613b1efffb8191a982b034ad35e}\label{class_qore_1_1_input_stream_line_iterator_a97843613b1efffb8191a982b034ad35e} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!getLine@{getLine}}
\index{getLine@{getLine}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{getLine()}{getLine()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::get\+Line (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid. 

\begin{DoxyReturn}{Returns}
the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}+\ \%y\(\backslash\)n"{}},\ i.getLine());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+ERROR} & the iterator is not pointing at a valid element \\
\hline
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1_input_stream_line_iterator_ac20e677f7b65af6efcad994e8baffcf0}{Input\+Stream\+Line\+Iterator\+::get\+Value()} 
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_ae6d45c5c3375e246ebf6e8657d16ae07}\label{class_qore_1_1_input_stream_line_iterator_ae6d45c5c3375e246ebf6e8657d16ae07} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!getStreamReader@{getStreamReader}}
\index{getStreamReader@{getStreamReader}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{getStreamReader()}{getStreamReader()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_stream_reader}{Stream\+Reader}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::get\+Stream\+Reader (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \doxylink{class_qore_1_1_stream_reader}{Stream\+Reader} object used internally. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{StreamReader\ sr\ =\ i.getStreamReader();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the \doxylink{class_qore_1_1_stream_reader}{Stream\+Reader} object used internally 
\end{DoxyReturn}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_ac20e677f7b65af6efcad994e8baffcf0}\label{class_qore_1_1_input_stream_line_iterator_ac20e677f7b65af6efcad994e8baffcf0} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!getValue@{getValue}}
\index{getValue@{getValue}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{getValue()}{getValue()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::get\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid. 

\begin{DoxyReturn}{Returns}
the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}+\ \%y\(\backslash\)n"{}},\ i.getValue());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+ERROR} & the iterator is not pointing at a valid element \\
\hline
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1_input_stream_line_iterator_a97843613b1efffb8191a982b034ad35e}{Input\+Stream\+Line\+Iterator\+::get\+Line()} 
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_ac2a16a29cd14271505149e96c144c814}\label{class_qore_1_1_input_stream_line_iterator_ac2a16a29cd14271505149e96c144c814} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!index@{index}}
\index{index@{index}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{index()}{index()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::index (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current iterator line number in the data (the first line is line 1) or 0 if not pointing at a valid element. 

\begin{DoxyReturn}{Returns}
the current iterator line number in the data (the first line is line 1) or 0 if not pointing at a valid element
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}+\ \%d:\ \%y\(\backslash\)n"{}},\ i.index(),\ i.getValue());}
\DoxyCodeLine{\}}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_a15869ee0a81ae224334f83f681b6e760}\label{class_qore_1_1_input_stream_line_iterator_a15869ee0a81ae224334f83f681b6e760} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!next@{next}}
\index{next@{next}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{next()}{next()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::next (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Moves the current position to the next line in the data; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more lines to read; if the iterator is not pointing at a valid element before this call, the iterator will be positioned to the beginning of the data. 

The iterator object should not be used after this method returns \doxysectlink{basic_data_types_False}{False}{2}.

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_False}{False}{2} if there are no more lines in the data (in which case the iterator object is invalid and should not be used); \doxysectlink{basic_data_types_True}{True}{2} if successful (meaning that the iterator object is valid)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}line:\ \%y\(\backslash\)n"{}},\ i.getValue());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_input_stream_line_iterator_ad67679ac159cec3362a5faed21f0dcdb}\label{class_qore_1_1_input_stream_line_iterator_ad67679ac159cec3362a5faed21f0dcdb} 
\index{Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}!valid@{valid}}
\index{valid@{valid}!Qore::InputStreamLineIterator@{Qore::InputStreamLineIterator}}
\doxysubsubsection{\texorpdfstring{valid()}{valid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::\+Input\+Stream\+Line\+Iterator\+::valid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not. 

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (i.valid())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}current\ value:\ \%y\(\backslash\)n"{}},\ i.getValue());}

\end{DoxyCode}
 
\end{DoxyParagraph}
