com.tensegrity.palojava.http
Class ResponseParser
java.lang.Object
com.tensegrity.palojava.http.ResponseParser
public class ResponseParser
- extends java.lang.Object
Provides methods for parsing the CSV response from palo server. The parsing
complies to csv data rules. For an overview of how to en- or decode comma
separated values see e.g. http://en.wikipedia.org/wiki/Comma-separated_values
- Version:
- $Id$
- Author:
- ArndHouben
Method Summary |
static java.lang.String[][] |
parse(java.lang.String response,
char delim)
Parses the given string. |
static java.lang.String[] |
parseLine(java.lang.String str,
char delim)
Parses the given csv line. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResponseParser
public ResponseParser()
parse
public static final java.lang.String[][] parse(java.lang.String response,
char delim)
- Parses the given string. The given string can contain more the one line.
The regular expression ';[\r\n]' is used to determine the line end.
- Parameters:
response
- the response string from the palo serverdelim
- the values delimiter
- Returns:
- the decoded values
parseLine
public static final java.lang.String[] parseLine(java.lang.String str,
char delim)
- Parses the given csv line.
- Parameters:
str
- the csv linedelim
- the values delimiter
- Returns:
- the decoded values