public class CSVParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CSVParser.Row |
static class |
CSVParser.Table |
Modifier and Type | Field and Description |
---|---|
private java.text.SimpleDateFormat[] |
dateFormats |
private java.lang.String |
encoding |
private char |
lineSeparator |
private char |
stringChar |
private char |
valueSeparator |
Constructor and Description |
---|
CSVParser() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEncoding() |
char |
getLineSeparator() |
char |
getStringCharacter() |
char |
getValueSeparator() |
CSVParser.Table |
parse(java.io.File f) |
CSVParser.Table |
parse(java.io.File f,
java.lang.String encoding) |
CSVParser.Table |
parse(java.io.InputStream inRaw) |
CSVParser.Table |
parse(java.io.InputStream inRaw,
java.lang.String encoding) |
CSVParser.Table |
parse(java.lang.String filename) |
CSVParser.Table |
parse(java.lang.String filename,
java.lang.String encoding) |
private java.util.Date |
parseDate(java.lang.String s) |
private java.lang.String |
parseIntPart(java.io.PushbackReader in) |
private java.lang.Object |
parseNumberOrDate(java.io.PushbackReader in) |
private java.lang.String |
parseString(java.io.PushbackReader in) |
private CSVParser.Row |
readLine(java.io.PushbackReader in) |
private java.lang.Object |
readValue(java.io.PushbackReader in) |
private boolean |
readValueSeparator(java.io.PushbackReader in) |
private void |
readWhitespace(java.io.PushbackReader in) |
void |
setEncoding(java.lang.String e) |
void |
setLineSeparator(char c) |
void |
setStringCharacter(char c) |
void |
setValueSeparator(char c) |
private char valueSeparator
private char lineSeparator
private char stringChar
private java.lang.String encoding
private java.text.SimpleDateFormat[] dateFormats
public CSVParser.Table parse(java.lang.String filename) throws java.io.IOException
java.io.IOException
public CSVParser.Table parse(java.lang.String filename, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public CSVParser.Table parse(java.io.File f) throws java.io.IOException
java.io.IOException
public CSVParser.Table parse(java.io.File f, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public CSVParser.Table parse(java.io.InputStream inRaw) throws java.io.IOException
java.io.IOException
public CSVParser.Table parse(java.io.InputStream inRaw, java.lang.String encoding) throws java.io.IOException
java.io.IOException
private CSVParser.Row readLine(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
private java.lang.Object readValue(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
private boolean readValueSeparator(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
private java.lang.Object parseNumberOrDate(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
private java.util.Date parseDate(java.lang.String s) throws java.io.IOException
java.io.IOException
private java.lang.String parseIntPart(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
private java.lang.String parseString(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
private void readWhitespace(java.io.PushbackReader in) throws java.io.IOException
java.io.IOException
public void setValueSeparator(char c)
public void setLineSeparator(char c)
public void setStringCharacter(char c)
public void setEncoding(java.lang.String e)
public char getValueSeparator()
public char getLineSeparator()
public char getStringCharacter()
public java.lang.String getEncoding()
Copyright 2004-2015 Wandora Team