• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0-google-internal) on Mon Jan 04 20:47:59 PST 2010 -->
6<TITLE>
7LineProcessor (Guava Libraries 2010.01.04)
8</TITLE>
9
10<META NAME="date" CONTENT="2010-01-04">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="LineProcessor (Guava Libraries 2010.01.04)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/LineProcessor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../com/google/common/io/LimitInputStream.html" title="class in com.google.common.io"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../com/google/common/io/LineReader.html" title="class in com.google.common.io"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?com/google/common/io/LineProcessor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="LineProcessor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91com.google.common.io</FONT>
92<BR>
93Interface LineProcessor&lt;T&gt;</H2>
94<HR>
95<DL>
96<DT><PRE>public interface <B>LineProcessor&lt;T&gt;</B></DL>
97</PRE>
98
99<P>
100A callback to be used with the streaming <code>readLines</code> methods.
101
102 <p><A HREF="../../../../com/google/common/io/LineProcessor.html#processLine(java.lang.String)"><CODE>processLine(java.lang.String)</CODE></A> will be called for each line that is read, and
103 should return <code>false</code> when you want to stop processing.
104<P>
105
106<P>
107<DL>
108<DT><B>Since:</B></DT>
109  <DD>2009.09.15 <b>tentative</b></DD>
110<DT><B>Author:</B></DT>
111  <DD>Miles Barr</DD>
112</DL>
113<HR>
114
115<P>
116
117<!-- ========== METHOD SUMMARY =========== -->
118
119<A NAME="method_summary"><!-- --></A>
120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
122<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
123<B>Method Summary</B></FONT></TH>
124</TR>
125<TR BGCOLOR="white" CLASS="TableRowColor">
126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
127<CODE>&nbsp;<A HREF="../../../../com/google/common/io/LineProcessor.html" title="type parameter in LineProcessor">T</A></CODE></FONT></TD>
128<TD><CODE><B><A HREF="../../../../com/google/common/io/LineProcessor.html#getResult()">getResult</A></B>()</CODE>
129
130<BR>
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the result of processing all the lines.</TD>
132</TR>
133<TR BGCOLOR="white" CLASS="TableRowColor">
134<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135<CODE>&nbsp;boolean</CODE></FONT></TD>
136<TD><CODE><B><A HREF="../../../../com/google/common/io/LineProcessor.html#processLine(java.lang.String)">processLine</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;line)</CODE>
137
138<BR>
139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method will be called once for each line.</TD>
140</TR>
141</TABLE>
142&nbsp;
143<P>
144
145<!-- ============ METHOD DETAIL ========== -->
146
147<A NAME="method_detail"><!-- --></A>
148<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
151<B>Method Detail</B></FONT></TH>
152</TR>
153</TABLE>
154
155<A NAME="processLine(java.lang.String)"><!-- --></A><H3>
156processLine</H3>
157<PRE>
158boolean <B>processLine</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;line)
159                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
160<DL>
161<DD>This method will be called once for each line.
162<P>
163<DD><DL>
164<DT><B>Parameters:</B><DD><CODE>line</CODE> - the line read from the input, without delimiter
165<DT><B>Returns:</B><DD>true to continue processing, false to stop
166<DT><B>Throws:</B>
167<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
168</DD>
169</DL>
170<HR>
171
172<A NAME="getResult()"><!-- --></A><H3>
173getResult</H3>
174<PRE>
175<A HREF="../../../../com/google/common/io/LineProcessor.html" title="type parameter in LineProcessor">T</A> <B>getResult</B>()</PRE>
176<DL>
177<DD>Return the result of processing all the lines.
178<P>
179<DD><DL>
180</DL>
181</DD>
182</DL>
183<!-- ========= END OF CLASS DATA ========= -->
184<HR>
185
186
187<!-- ======= START OF BOTTOM NAVBAR ====== -->
188<A NAME="navbar_bottom"><!-- --></A>
189<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
190<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
191<TR>
192<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
193<A NAME="navbar_bottom_firstrow"><!-- --></A>
194<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
195  <TR ALIGN="center" VALIGN="top">
196  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
197  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
198  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
199  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/LineProcessor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
200  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
201  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
202  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
203  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
204  </TR>
205</TABLE>
206</TD>
207<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
208</EM>
209</TD>
210</TR>
211
212<TR>
213<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
214&nbsp;<A HREF="../../../../com/google/common/io/LimitInputStream.html" title="class in com.google.common.io"><B>PREV CLASS</B></A>&nbsp;
215&nbsp;<A HREF="../../../../com/google/common/io/LineReader.html" title="class in com.google.common.io"><B>NEXT CLASS</B></A></FONT></TD>
216<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
217  <A HREF="../../../../index.html?com/google/common/io/LineProcessor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
218&nbsp;<A HREF="LineProcessor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
219&nbsp;<SCRIPT type="text/javascript">
220  <!--
221  if(window==top) {
222    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
223  }
224  //-->
225</SCRIPT>
226<NOSCRIPT>
227  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
228</NOSCRIPT>
229
230
231</FONT></TD>
232</TR>
233<TR>
234<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
235  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
236<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
237DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
238</TR>
239</TABLE>
240<A NAME="skip-navbar_bottom"></A>
241<!-- ======== END OF BOTTOM NAVBAR ======= -->
242
243<HR>
244
245</BODY>
246</HTML>
247