FILLLEFT
public static final int FILLLEFT
Fill content the the left. Mainly usable together with fixedWidth *
FILLNONE
public static final int FILLNONE
Do no do any filling *
FILLRIGHT
public static final int FILLRIGHT
Fill content to the right. Mainly usable together with fixedWidth *
delimiter
private char delimiter
The seperator character. Defaults to ,
endTrimmed
private boolean endTrimmed
Specifies if the end of the line needs to be trimmed
fieldHeader
private boolean fieldHeader
Specifies if we want to use a field header
fields
private List fields
list of fields *
fill
private int fill
The fill pattern
fillChar
private char fillChar
The fill char. Defaults to a space
fixedWidth
private boolean fixedWidth
specifies if it is a fixed width csv file *
ignoreDelimiter
private boolean ignoreDelimiter
Should we ignore the delimiter. Defaults to false
ignoreValueDelimiter
private boolean ignoreValueDelimiter
Should we ignore the value delimiter. Defaults to true
valueDelimiter
private char valueDelimiter
the value delimiter. Defaults to "
addField
public void addField(CSVField field)
equals
public boolean equals(Object obj)
TODO..
java.lang.Object.equals(java.lang.Object)
getDelimiter
public char getDelimiter()
getField
public CSVField getField(String name)
getFields
public CSVField[] getFields()
- an array with the known fields (even if no fields are specified)
getFill
public int getFill()
getFillChar
public char getFillChar()
- the fillchar. Defaults to a space.
getValueDelimiter
public char getValueDelimiter()
- the value delimeter used. Defaults to "
guessConfig
public static CSVConfig guessConfig(InputStream inputStream)
Creates a config based on a stream. It tries to guess
NOTE : The stream will be closed.
inputStream
- the inputstream.
isDelimiterIgnored
public boolean isDelimiterIgnored()
- if the writer should ignore the delimiter character.
isEndTrimmed
public boolean isEndTrimmed()
- if the end of the line should be trimmed. Default is false.
isFieldHeader
public boolean isFieldHeader()
- if a field header is used. Defaults to false
isFixedWidth
public boolean isFixedWidth()
- if the CSV file is fixedWidth
isValueDelimiterIgnored
public boolean isValueDelimiterIgnored()
- if the writer should ignore the value delimiter character.
Defaults to true.
setDelimiter
public void setDelimiter(char delimiter)
Set the delimiter to use
delimiter
- the delimiter character.
setEndTrimmed
public void setEndTrimmed(boolean endTrimmed)
Specify if the end of the line needs to be trimmed. Defaults to false.
setFieldHeader
public void setFieldHeader(boolean fieldHeader)
Specify if you want to use a field header.
fieldHeader
- true or false.
setFields
public void setFields(Collection csvField)
Set the fields that should be used by the writer
csvField
- a collection with fields. If null it will do nothing
setFields
public void setFields(CSVField[] csvFields)
Set the fields that should be used by the writer.
This will overwrite currently added fields completely!
csvFields
- the csvfields array. If null it will do nothing
setFill
public void setFill(int fill)
setFillChar
public void setFillChar(char fillChar)
Set the fill char
setFixedWidth
public void setFixedWidth(boolean fixedWidth)
Specify if the CSV file is fixed width.
Defaults to false
fixedWidth
- the fixedwidth
setIgnoreDelimiter
public void setIgnoreDelimiter(boolean ignoreDelimiter)
Specify if the writer should ignore the delimiter.
ignoreDelimiter
- defaults to false.
setIgnoreValueDelimiter
public void setIgnoreValueDelimiter(boolean ignoreValueDelimiter)
Specify if the writer should ignore the value delimiter.
ignoreValueDelimiter
- defaults to false.
setValueDelimiter
public void setValueDelimiter(char valueDelimiter)
Set the value delimiter to use
valueDelimiter
- the value delimiter character.