public class CSVConfig extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FILLLEFT
Fill content the the left.
|
static int |
FILLNONE
Do no do any filling
|
static int |
FILLRIGHT
Fill content to the right.
|
Constructor and Description |
---|
CSVConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addField(CSVField field) |
boolean |
equals(Object obj)
TODO..
|
char |
getDelimiter() |
CSVField |
getField(String name) |
CSVField[] |
getFields() |
int |
getFill() |
char |
getFillChar() |
char |
getValueDelimiter() |
static CSVConfig |
guessConfig(InputStream inputStream)
Creates a config based on a stream.
|
boolean |
isDelimiterIgnored() |
boolean |
isEndTrimmed() |
boolean |
isFieldHeader() |
boolean |
isFixedWidth() |
boolean |
isValueDelimiterIgnored() |
void |
setDelimiter(char delimiter)
Set the delimiter to use
|
void |
setEndTrimmed(boolean endTrimmed)
Specify if the end of the line needs to be trimmed.
|
void |
setFieldHeader(boolean fieldHeader)
Specify if you want to use a field header.
|
void |
setFields(Collection csvField)
Set the fields that should be used by the writer
|
void |
setFields(CSVField[] csvFields)
Set the fields that should be used by the writer.
|
void |
setFill(int fill)
Set the fill pattern.
|
void |
setFillChar(char fillChar)
Set the fill char
|
void |
setFixedWidth(boolean fixedWidth)
Specify if the CSV file is fixed width.
|
void |
setIgnoreDelimiter(boolean ignoreDelimiter)
Specify if the writer should ignore the delimiter.
|
void |
setIgnoreValueDelimiter(boolean ignoreValueDelimiter)
Specify if the writer should ignore the value delimiter.
|
void |
setValueDelimiter(char valueDelimiter)
Set the value delimiter to use
|
public static final int FILLNONE
public static final int FILLLEFT
public static final int FILLRIGHT
public boolean isFixedWidth()
public void setFixedWidth(boolean fixedWidth)
fixedWidth
- the fixedwidthpublic void addField(CSVField field)
public void setFields(CSVField[] csvFields)
csvFields
- the csvfields array. If null it will do nothingpublic void setFields(Collection csvField)
csvField
- a collection with fields. If null it will do nothingpublic CSVField[] getFields()
public int getFill()
public void setFill(int fill)
fill
- the fill pattern.public char getFillChar()
public void setFillChar(char fillChar)
fillChar
- the fill charpublic char getDelimiter()
public void setDelimiter(char delimiter)
delimiter
- the delimiter character.public boolean isDelimiterIgnored()
public void setIgnoreDelimiter(boolean ignoreDelimiter)
ignoreDelimiter
- defaults to false.public char getValueDelimiter()
public void setValueDelimiter(char valueDelimiter)
valueDelimiter
- the value delimiter character.public boolean isValueDelimiterIgnored()
public void setIgnoreValueDelimiter(boolean ignoreValueDelimiter)
ignoreValueDelimiter
- defaults to false.public boolean isFieldHeader()
public void setFieldHeader(boolean fieldHeader)
fieldHeader
- true or false.public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public static CSVConfig guessConfig(InputStream inputStream)
inputStream
- the inputstream.public boolean isEndTrimmed()
public void setEndTrimmed(boolean endTrimmed)
endTrimmed
-