%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.turbine.util.DataStreamParser |
|
|
1 | package org.apache.turbine.util; |
|
2 | ||
3 | /* |
|
4 | * Copyright 2001-2005 The Apache Software Foundation. |
|
5 | * |
|
6 | * Licensed under the Apache License, Version 2.0 (the "License") |
|
7 | * you may not use this file except in compliance with the License. |
|
8 | * You may obtain a copy of the License at |
|
9 | * |
|
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | * |
|
12 | * Unless required by applicable law or agreed to in writing, software |
|
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | * See the License for the specific language governing permissions and |
|
16 | * limitations under the License. |
|
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 | 0 | super(in, columnNames, characterEncoding); |
63 | 0 | } |
64 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |