1 package org.apache.turbine.util;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.io.Reader;
20
21 import java.util.List;
22
23 /***
24 * DataStreamParser is used to parse a stream with a fixed format and
25 * generate ValueParser objects which can be used to extract the values
26 * in the desired type.
27 *
28 * <p>The class itself is abstract - a concrete subclass which implements
29 * the initTokenizer method such as CSVParser or TSVParser is required
30 * to use the functionality.
31 *
32 * <p>The class implements the java.util.Iterator interface for convenience.
33 * This allows simple use in a Velocity template for example:
34 *
35 * <pre>
36 * #foreach ($row in $datastream)
37 * Name: $row.Name
38 * Description: $row.Description
39 * #end
40 * </pre>
41 *
42 * @author <a href="mailto:sean@informage.net">Sean Legassick</a>
43 * @author <a href="mailto:martin@mvdb.net">Martin van den Bemt</a>
44 * @version $Id: DataStreamParser.java 264148 2005-08-29 14:21:04Z henning $
45 * @deprecated Use org.apache.turbine.util.parser.DataStreamParser instead.
46 */
47 public abstract class DataStreamParser
48 extends org.apache.turbine.util.parser.DataStreamParser
49 {
50 /***
51 * Create a new DataStreamParser instance. Requires a Reader to read the
52 * comma-separated values from, a list of column names and a
53 * character encoding.
54 *
55 * @param in the input reader.
56 * @param columnNames a list of column names.
57 * @param characterEncoding the character encoding of the input.
58 */
59 public DataStreamParser(Reader in, List columnNames,
60 String characterEncoding)
61 {
62 super(in, columnNames, characterEncoding);
63 }
64 }