org.onebusaway.gtfs.csv
Class CSVLibrary
java.lang.Object
org.onebusaway.gtfs.csv.CSVLibrary
public class CSVLibrary
- extends java.lang.Object
Why do we have our own CSV reader when there are a couple of existing Java
libraries? Mostly because we need to be able to handle some malformed CSV
that most parsers would choke on but that agencies produce and google seems
to validate as well.
- Author:
- bdferris
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSVLibrary
public CSVLibrary()
escapeValue
public static java.lang.String escapeValue(java.lang.String value)
getArrayAsCSV
public static java.lang.String getArrayAsCSV(double[] args)
getArrayAsCSV
public static <T> java.lang.String getArrayAsCSV(T[] args)
getIterableAsCSV
public static <T> java.lang.String getIterableAsCSV(java.lang.Iterable<T> args)
getAsCSV
public static java.lang.String getAsCSV(java.lang.Object... args)
parse
public static final void parse(java.io.InputStream is,
CSVListener handler)
throws java.lang.Exception
- Throws:
java.lang.Exception
parse
public static final void parse(java.io.File input,
CSVListener handler)
throws java.lang.Exception
- Throws:
java.lang.Exception
parse
public static void parse(java.io.BufferedReader r,
CSVListener handler)
throws java.io.IOException,
java.lang.Exception
- Throws:
java.io.IOException
java.lang.Exception
parse
public static final java.util.List<java.lang.String> parse(java.lang.String line)
Copyright © 2011 OneBusAway. All Rights Reserved.