source: sandbox/expresso-solr/solr/docs/api/org/apache/solr/internal/csv/CSVParser.html @ 7588

Revision 7588, 32.9 KB checked in by adir, 11 years ago (diff)

Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade

Line 
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_24) on Mon Jun 25 15:26:24 EDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=utf-8">
7<TITLE>
8CSVParser (Solr 4.0.0-ALPHA API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-06-25">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18    if (location.href.indexOf('is-external=true') == -1) {
19        parent.document.title="CSVParser (Solr 4.0.0-ALPHA API)";
20    }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
32<!-- ========= START OF TOP NAVBAR ======= -->
33<A NAME="navbar_top"><!-- --></A>
34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36<TR>
37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38<A NAME="navbar_top_firstrow"><!-- --></A>
39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40  <TR ALIGN="center" VALIGN="top">
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CSVParser.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</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="../../../../../org/apache/solr/internal/csv/CharBuffer.html" title="class in org.apache.solr.internal.csv"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/solr/internal/csv/CSVPrinter.html" title="class in org.apache.solr.internal.csv"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/solr/internal/csv/CSVParser.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="CSVParser.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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">
91org.apache.solr.internal.csv</FONT>
92<BR>
93Class CSVParser</H2>
94<PRE>
95<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.solr.internal.csv.CSVParser</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>CSVParser</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104Parses CSV files according to the specified configuration.
105
106 Because CSV appears in many different dialects, the parser supports many
107 configuration settings by allowing the specification of a <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.
108 
109 <p>Parsing of a csv-string having tabs as separators,
110 '"' as an optional value encapsulator, and comments starting with '#':</p>
111 <pre>
112  String[][] data =
113   (new CSVParser(new StringReader("a\tb\nc\td"), new CSVStrategy('\t','"','#'))).getAllValues();
114 </pre>
115 
116 <p>Parsing of a csv-string in Excel CSV format</p>
117 <pre>
118  String[][] data =
119   (new CSVParser(new StringReader("a;b\nc;d"), CSVStrategy.EXCEL_STRATEGY)).getAllValues();
120 </pre>
121 
122 <p>
123 Internal parser state is completely covered by the strategy
124 and the reader-state.</p>
125 
126 <p>see <a href="package-summary.html">package documentation</a>
127 for more details</p>
128<P>
129
130<P>
131<HR>
132
133<P>
134<!-- =========== FIELD SUMMARY =========== -->
135
136<A NAME="field_summary"><!-- --></A>
137<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
138<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
139<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
140<B>Field Summary</B></FONT></TH>
141</TR>
142<TR BGCOLOR="white" CLASS="TableRowColor">
143<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144<CODE>protected static&nbsp;int</CODE></FONT></TD>
145<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#TT_EOF">TT_EOF</A></B></CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Token (which can have content) when end of file is reached.</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>protected static&nbsp;int</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#TT_EORECORD">TT_EORECORD</A></B></CODE>
154
155<BR>
156&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Token with content when end of a line is reached.</TD>
157</TR>
158<TR BGCOLOR="white" CLASS="TableRowColor">
159<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
160<CODE>protected static&nbsp;int</CODE></FONT></TD>
161<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#TT_INVALID">TT_INVALID</A></B></CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Token has no valid content, i.e.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>protected static&nbsp;int</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#TT_TOKEN">TT_TOKEN</A></B></CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Token with content, at beginning or in the middle of a line.</TD>
173</TR>
174</TABLE>
175&nbsp;
176<!-- ======== CONSTRUCTOR SUMMARY ======== -->
177
178<A NAME="constructor_summary"><!-- --></A>
179<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
180<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
181<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
182<B>Constructor Summary</B></FONT></TH>
183</TR>
184<TR BGCOLOR="white" CLASS="TableRowColor">
185<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.InputStream)">CSVParser</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;input)</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use <A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader)"><CODE>CSVParser(Reader)</CODE></A>.</I></TD>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader)">CSVParser</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input)</CODE>
192
193<BR>
194&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CSV parser using the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.</TD>
195</TR>
196<TR BGCOLOR="white" CLASS="TableRowColor">
197<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, char)">CSVParser</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input,
198          char&nbsp;delimiter)</CODE>
199
200<BR>
201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use <A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, org.apache.solr.internal.csv.CSVStrategy)"><CODE>CSVParser(Reader,CSVStrategy)</CODE></A>.</I></TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, char, char, char)">CSVParser</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input,
205          char&nbsp;delimiter,
206          char&nbsp;encapsulator,
207          char&nbsp;commentStart)</CODE>
208
209<BR>
210&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use <A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, org.apache.solr.internal.csv.CSVStrategy)"><CODE>CSVParser(Reader,CSVStrategy)</CODE></A>.</I></TD>
211</TR>
212<TR BGCOLOR="white" CLASS="TableRowColor">
213<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, org.apache.solr.internal.csv.CSVStrategy)">CSVParser</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input,
214          <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv">CSVStrategy</A>&nbsp;strategy)</CODE>
215
216<BR>
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customized CSV parser using the given <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A></TD>
218</TR>
219</TABLE>
220&nbsp;
221<!-- ========== METHOD SUMMARY =========== -->
222
223<A NAME="method_summary"><!-- --></A>
224<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
225<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
226<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
227<B>Method Summary</B></FONT></TH>
228</TR>
229<TR BGCOLOR="white" CLASS="TableRowColor">
230<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
231<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[][]</CODE></FONT></TD>
232<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#getAllValues()">getAllValues</A></B>()</CODE>
233
234<BR>
235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses the CSV according to the given strategy
236 and returns the content as an array of records
237 (whereas records are arrays of single values).</TD>
238</TR>
239<TR BGCOLOR="white" CLASS="TableRowColor">
240<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
241<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
242<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#getLine()">getLine</A></B>()</CODE>
243
244<BR>
245&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses from the current point in the stream til
246 the end of the current line.</TD>
247</TR>
248<TR BGCOLOR="white" CLASS="TableRowColor">
249<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
250<CODE>&nbsp;int</CODE></FONT></TD>
251<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#getLineNumber()">getLineNumber</A></B>()</CODE>
252
253<BR>
254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current line number in the input stream.</TD>
255</TR>
256<TR BGCOLOR="white" CLASS="TableRowColor">
257<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
258<CODE>&nbsp;<A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv">CSVStrategy</A></CODE></FONT></TD>
259<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#getStrategy()">getStrategy</A></B>()</CODE>
260
261<BR>
262&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtain the specified CSV Strategy.</TD>
263</TR>
264<TR BGCOLOR="white" CLASS="TableRowColor">
265<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266<CODE>protected &nbsp;org.apache.solr.internal.csv.CSVParser.Token</CODE></FONT></TD>
267<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#nextToken()">nextToken</A></B>()</CODE>
268
269<BR>
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method for <code>nextToken(null)</code>.</TD>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274<CODE>protected &nbsp;org.apache.solr.internal.csv.CSVParser.Token</CODE></FONT></TD>
275<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#nextToken(org.apache.solr.internal.csv.CSVParser.Token)">nextToken</A></B>(org.apache.solr.internal.csv.CSVParser.Token&nbsp;tkn)</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the next token.</TD>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#nextValue()">nextValue</A></B>()</CODE>
284
285<BR>
286&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses the CSV according to the given strategy
287 and returns the next csv-value as string.</TD>
288</TR>
289<TR BGCOLOR="white" CLASS="TableRowColor">
290<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
291<CODE>protected &nbsp;int</CODE></FONT></TD>
292<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#unicodeEscapeLexer(int)">unicodeEscapeLexer</A></B>(int&nbsp;c)</CODE>
293
294<BR>
295&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes Unicode escapes.</TD>
296</TR>
297</TABLE>
298&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
299<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
300<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
301<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
302</TR>
303<TR BGCOLOR="white" CLASS="TableRowColor">
304<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
305</TR>
306</TABLE>
307&nbsp;
308<P>
309
310<!-- ============ FIELD DETAIL =========== -->
311
312<A NAME="field_detail"><!-- --></A>
313<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
314<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
315<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
316<B>Field Detail</B></FONT></TH>
317</TR>
318</TABLE>
319
320<A NAME="TT_INVALID"><!-- --></A><H3>
321TT_INVALID</H3>
322<PRE>
323protected static final int <B>TT_INVALID</B></PRE>
324<DL>
325<DD>Token has no valid content, i.e. is in its initilized state.
326<P>
327<DL>
328<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.solr.internal.csv.CSVParser.TT_INVALID">Constant Field Values</A></DL>
329</DL>
330<HR>
331
332<A NAME="TT_TOKEN"><!-- --></A><H3>
333TT_TOKEN</H3>
334<PRE>
335protected static final int <B>TT_TOKEN</B></PRE>
336<DL>
337<DD>Token with content, at beginning or in the middle of a line.
338<P>
339<DL>
340<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.solr.internal.csv.CSVParser.TT_TOKEN">Constant Field Values</A></DL>
341</DL>
342<HR>
343
344<A NAME="TT_EOF"><!-- --></A><H3>
345TT_EOF</H3>
346<PRE>
347protected static final int <B>TT_EOF</B></PRE>
348<DL>
349<DD>Token (which can have content) when end of file is reached.
350<P>
351<DL>
352<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.solr.internal.csv.CSVParser.TT_EOF">Constant Field Values</A></DL>
353</DL>
354<HR>
355
356<A NAME="TT_EORECORD"><!-- --></A><H3>
357TT_EORECORD</H3>
358<PRE>
359protected static final int <B>TT_EORECORD</B></PRE>
360<DL>
361<DD>Token with content when end of a line is reached.
362<P>
363<DL>
364<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.solr.internal.csv.CSVParser.TT_EORECORD">Constant Field Values</A></DL>
365</DL>
366
367<!-- ========= CONSTRUCTOR DETAIL ======== -->
368
369<A NAME="constructor_detail"><!-- --></A>
370<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
371<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
372<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
373<B>Constructor Detail</B></FONT></TH>
374</TR>
375</TABLE>
376
377<A NAME="CSVParser(java.io.InputStream)"><!-- --></A><H3>
378CSVParser</H3>
379<PRE>
380public <B>CSVParser</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;input)</PRE>
381<DL>
382<DD><B>Deprecated.</B>&nbsp;<I>use <A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader)"><CODE>CSVParser(Reader)</CODE></A>.</I>
383<P>
384<DD>Default strategy for the parser follows the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.
385<P>
386<DL>
387<DT><B>Parameters:</B><DD><CODE>input</CODE> - an InputStream containing "csv-formatted" stream</DL>
388</DL>
389<HR>
390
391<A NAME="CSVParser(java.io.Reader)"><!-- --></A><H3>
392CSVParser</H3>
393<PRE>
394public <B>CSVParser</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input)</PRE>
395<DL>
396<DD>CSV parser using the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.
397<P>
398<DL>
399<DT><B>Parameters:</B><DD><CODE>input</CODE> - a Reader containing "csv-formatted" input</DL>
400</DL>
401<HR>
402
403<A NAME="CSVParser(java.io.Reader, char)"><!-- --></A><H3>
404CSVParser</H3>
405<PRE>
406public <B>CSVParser</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input,
407                 char&nbsp;delimiter)</PRE>
408<DL>
409<DD><B>Deprecated.</B>&nbsp;<I>use <A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, org.apache.solr.internal.csv.CSVStrategy)"><CODE>CSVParser(Reader,CSVStrategy)</CODE></A>.</I>
410<P>
411<DD>Customized value delimiter parser.
412 
413 The parser follows the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>
414 except for the delimiter setting.
415<P>
416<DL>
417<DT><B>Parameters:</B><DD><CODE>input</CODE> - a Reader based on "csv-formatted" input<DD><CODE>delimiter</CODE> - a Char used for value separation</DL>
418</DL>
419<HR>
420
421<A NAME="CSVParser(java.io.Reader, char, char, char)"><!-- --></A><H3>
422CSVParser</H3>
423<PRE>
424public <B>CSVParser</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input,
425                 char&nbsp;delimiter,
426                 char&nbsp;encapsulator,
427                 char&nbsp;commentStart)</PRE>
428<DL>
429<DD><B>Deprecated.</B>&nbsp;<I>use <A HREF="../../../../../org/apache/solr/internal/csv/CSVParser.html#CSVParser(java.io.Reader, org.apache.solr.internal.csv.CSVStrategy)"><CODE>CSVParser(Reader,CSVStrategy)</CODE></A>.</I>
430<P>
431<DD>Customized csv parser.
432 
433 The parser parses according to the given CSV dialect settings.
434 Leading whitespaces are truncated, unicode escapes are
435 not interpreted and empty lines are ignored.
436<P>
437<DL>
438<DT><B>Parameters:</B><DD><CODE>input</CODE> - a Reader based on "csv-formatted" input<DD><CODE>delimiter</CODE> - a Char used for value separation<DD><CODE>encapsulator</CODE> - a Char used as value encapsulation marker<DD><CODE>commentStart</CODE> - a Char used for comment identification</DL>
439</DL>
440<HR>
441
442<A NAME="CSVParser(java.io.Reader, org.apache.solr.internal.csv.CSVStrategy)"><!-- --></A><H3>
443CSVParser</H3>
444<PRE>
445public <B>CSVParser</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;input,
446                 <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv">CSVStrategy</A>&nbsp;strategy)</PRE>
447<DL>
448<DD>Customized CSV parser using the given <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>
449<P>
450<DL>
451<DT><B>Parameters:</B><DD><CODE>input</CODE> - a Reader containing "csv-formatted" input<DD><CODE>strategy</CODE> - the CSVStrategy used for CSV parsing</DL>
452</DL>
453
454<!-- ============ METHOD DETAIL ========== -->
455
456<A NAME="method_detail"><!-- --></A>
457<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
458<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
459<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
460<B>Method Detail</B></FONT></TH>
461</TR>
462</TABLE>
463
464<A NAME="getAllValues()"><!-- --></A><H3>
465getAllValues</H3>
466<PRE>
467public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[][] <B>getAllValues</B>()
468                        throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
469<DL>
470<DD>Parses the CSV according to the given strategy
471 and returns the content as an array of records
472 (whereas records are arrays of single values).
473 <p>
474 The returned content starts at the current parse-position in
475 the stream.
476<P>
477<DD><DL>
478
479<DT><B>Returns:</B><DD>matrix of records x values ('null' when end of file)
480<DT><B>Throws:</B>
481<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on parse error or input read-failure</DL>
482</DD>
483</DL>
484<HR>
485
486<A NAME="nextValue()"><!-- --></A><H3>
487nextValue</H3>
488<PRE>
489public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>nextValue</B>()
490                 throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
491<DL>
492<DD>Parses the CSV according to the given strategy
493 and returns the next csv-value as string.
494<P>
495<DD><DL>
496
497<DT><B>Returns:</B><DD>next value in the input stream ('null' when end of file)
498<DT><B>Throws:</B>
499<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on parse error or input read-failure</DL>
500</DD>
501</DL>
502<HR>
503
504<A NAME="getLine()"><!-- --></A><H3>
505getLine</H3>
506<PRE>
507public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>getLine</B>()
508                 throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
509<DL>
510<DD>Parses from the current point in the stream til
511 the end of the current line.
512<P>
513<DD><DL>
514
515<DT><B>Returns:</B><DD>array of values til end of line
516        ('null' when end of file has been reached)
517<DT><B>Throws:</B>
518<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on parse error or input read-failure</DL>
519</DD>
520</DL>
521<HR>
522
523<A NAME="getLineNumber()"><!-- --></A><H3>
524getLineNumber</H3>
525<PRE>
526public int <B>getLineNumber</B>()</PRE>
527<DL>
528<DD>Returns the current line number in the input stream.
529 
530 ATTENTION: in case your csv has multiline-values the returned
531            number does not correspond to the record-number
532<P>
533<DD><DL>
534
535<DT><B>Returns:</B><DD>current line number</DL>
536</DD>
537</DL>
538<HR>
539
540<A NAME="nextToken()"><!-- --></A><H3>
541nextToken</H3>
542<PRE>
543protected org.apache.solr.internal.csv.CSVParser.Token <B>nextToken</B>()
544                                                          throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
545<DL>
546<DD>Convenience method for <code>nextToken(null)</code>.
547<P>
548<DD><DL>
549
550<DT><B>Throws:</B>
551<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
552</DD>
553</DL>
554<HR>
555
556<A NAME="nextToken(org.apache.solr.internal.csv.CSVParser.Token)"><!-- --></A><H3>
557nextToken</H3>
558<PRE>
559protected org.apache.solr.internal.csv.CSVParser.Token <B>nextToken</B>(org.apache.solr.internal.csv.CSVParser.Token&nbsp;tkn)
560                                                          throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
561<DL>
562<DD>Returns the next token.
563 
564 A token corresponds to a term, a record change or an
565 end-of-file indicator.
566<P>
567<DD><DL>
568<DT><B>Parameters:</B><DD><CODE>tkn</CODE> - an existing Token object to reuse. The caller is responsible to initialize the
569 Token.
570<DT><B>Returns:</B><DD>the next token found
571<DT><B>Throws:</B>
572<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on stream access error</DL>
573</DD>
574</DL>
575<HR>
576
577<A NAME="unicodeEscapeLexer(int)"><!-- --></A><H3>
578unicodeEscapeLexer</H3>
579<PRE>
580protected int <B>unicodeEscapeLexer</B>(int&nbsp;c)
581                          throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
582<DL>
583<DD>Decodes Unicode escapes.
584 
585 Interpretation of "\\uXXXX" escape sequences
586 where XXXX is a hex-number.
587<P>
588<DD><DL>
589<DT><B>Parameters:</B><DD><CODE>c</CODE> - current char which is discarded because it's the "\\" of "\\uXXXX"
590<DT><B>Returns:</B><DD>the decoded character
591<DT><B>Throws:</B>
592<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on wrong unicode escape sequence or read error</DL>
593</DD>
594</DL>
595<HR>
596
597<A NAME="getStrategy()"><!-- --></A><H3>
598getStrategy</H3>
599<PRE>
600public <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv">CSVStrategy</A> <B>getStrategy</B>()</PRE>
601<DL>
602<DD>Obtain the specified CSV Strategy.  This should not be modified.
603<P>
604<DD><DL>
605
606<DT><B>Returns:</B><DD>strategy currently being used</DL>
607</DD>
608</DL>
609<!-- ========= END OF CLASS DATA ========= -->
610<HR>
611
612
613<!-- ======= START OF BOTTOM NAVBAR ====== -->
614<A NAME="navbar_bottom"><!-- --></A>
615<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
616<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
617<TR>
618<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
619<A NAME="navbar_bottom_firstrow"><!-- --></A>
620<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
621  <TR ALIGN="center" VALIGN="top">
622  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
623  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
624  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
625  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CSVParser.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
626  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
627  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
628  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
629  </TR>
630</TABLE>
631</TD>
632<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
633</EM>
634</TD>
635</TR>
636
637<TR>
638<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
639&nbsp;<A HREF="../../../../../org/apache/solr/internal/csv/CharBuffer.html" title="class in org.apache.solr.internal.csv"><B>PREV CLASS</B></A>&nbsp;
640&nbsp;<A HREF="../../../../../org/apache/solr/internal/csv/CSVPrinter.html" title="class in org.apache.solr.internal.csv"><B>NEXT CLASS</B></A></FONT></TD>
641<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
642  <A HREF="../../../../../index.html?org/apache/solr/internal/csv/CSVParser.html" target="_top"><B>FRAMES</B></A>  &nbsp;
643&nbsp;<A HREF="CSVParser.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
644&nbsp;<SCRIPT type="text/javascript">
645  <!--
646  if(window==top) {
647    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
648  }
649  //-->
650</SCRIPT>
651<NOSCRIPT>
652  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
653</NOSCRIPT>
654
655
656</FONT></TD>
657</TR>
658<TR>
659<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
660  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
661<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
662DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
663</TR>
664</TABLE>
665<A NAME="skip-navbar_bottom"></A>
666<!-- ======== END OF BOTTOM NAVBAR ======= -->
667
668<HR>
669
670          <address>Copyright &copy; 2000-2012 Apache Software Foundation.  All Rights Reserved.</address>
671          <script src='../../../../../prettify.js' type='text/javascript'></script>
672          <script type='text/javascript'>
673            (function(){
674              var oldonload = window.onload;
675              if (typeof oldonload != 'function') {
676                window.onload = prettyPrint;
677              } else {
678                window.onload = function() {
679                  oldonload();
680                  prettyPrint();
681                }
682              }
683            })();
684          </script>
685       
686</BODY>
687</HTML>
Note: See TracBrowser for help on using the repository browser.