org.apache.turbine.util
Class DataStreamParser
java.lang.Object
org.apache.turbine.util.parser.DataStreamParser
org.apache.turbine.util.DataStreamParser
- All Implemented Interfaces:
- java.util.Iterator
Deprecated. Use org.apache.turbine.util.parser.DataStreamParser instead.
- public abstract class DataStreamParser
- extends DataStreamParser
DataStreamParser is used to parse a stream with a fixed format and
generate ValueParser objects which can be used to extract the values
in the desired type.
The class itself is abstract - a concrete subclass which implements
the initTokenizer method such as CSVParser or TSVParser is required
to use the functionality.
The class implements the java.util.Iterator interface for convenience.
This allows simple use in a Velocity template for example:
#foreach ($row in $datastream)
Name: $row.Name
Description: $row.Description
#end
- Version:
- $Id: DataStreamParser.java 264148 2005-08-29 14:21:04Z henning $
- Author:
- Sean Legassick, Martin van den Bemt
Constructor Summary |
DataStreamParser(java.io.Reader in,
java.util.List columnNames,
java.lang.String characterEncoding)
Deprecated. Create a new DataStreamParser instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataStreamParser
public DataStreamParser(java.io.Reader in,
java.util.List columnNames,
java.lang.String characterEncoding)
- Deprecated.
- Create a new DataStreamParser instance. Requires a Reader to read the
comma-separated values from, a list of column names and a
character encoding.
- Parameters:
in
- the input reader.columnNames
- a list of column names.characterEncoding
- the character encoding of the input.
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.