Package com.groiss.fileimport.csv
Class CSVSettings
java.lang.Object
com.groiss.fileimport.StructuredFileSettings
com.groiss.fileimport.csv.CSVSettings
describes a csv-file
-
Field Summary
Fields inherited from class com.groiss.fileimport.StructuredFileSettings
deserializers, file, inputStream, reader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSerializer
(Class<?> clazz, Serializer serializer) register a deserializer by default the toString method of the given object will be used to get the string-representation if you don't want this, you can write your ownDeserializer
getColumn
(int index) char
getQuote()
char
Map<Class<?>,
Serializer> boolean
boolean
boolean
boolean
boolean
void
loadSettings
(Element importdesc) void
setCharset
(Charset charset) void
setCommentChar
(String commentChar) void
setEscapeMode
(EscapeMode escapeMode) void
setFixedWidth
(boolean fixedWidth) void
setHasHeader
(boolean hasHeader) void
setLineEnd
(String lineEnd) void
setOutputStream
(OutputStream outputStream) void
setQuote
(char quote) void
setQuoteAll
(boolean quoteAll) void
setSeparator
(char separator) void
setUseSeparator
(boolean useSeparator) void
toString()
Methods inherited from class com.groiss.fileimport.StructuredFileSettings
addDeserializer, addDeserializer, checkLocked, getDeserializers, getFile, getInputStream, getReader, isComplete, isLocked, setFile, setInputStream, setLocked, setReader
-
Constructor Details
-
CSVSettings
public CSVSettings()
-
-
Method Details
-
addColumn
-
addColumn
-
addColumn
-
addSerializer
register a deserializer by default the toString method of the given object will be used to get the string-representation if you don't want this, you can write your ownDeserializer
- Parameters:
clazz
-serializer
-
-
getCharset
- Overrides:
getCharset
in classStructuredFileSettings
-
getColumn
-
getColumn
-
getColumns
- Specified by:
getColumns
in classStructuredFileSettings
-
getCommentChar
-
getEscapeMode
-
getLineEnd
-
getOutputStream
-
getQuote
public char getQuote() -
getSeparator
public char getSeparator() -
getSerializers
- Returns:
- the serializers
-
getWriter
-
isFixedWidth
public boolean isFixedWidth() -
isHasHeader
public boolean isHasHeader() -
isQuoteAll
public boolean isQuoteAll() -
isUseComment
public boolean isUseComment() -
isUseSeparator
public boolean isUseSeparator() -
loadSettings
public void loadSettings(Element importdesc) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException -
setCharset
- Parameters:
charset
- the charset to set
-
setCommentChar
-
setEscapeMode
-
setFixedWidth
public void setFixedWidth(boolean fixedWidth) -
setHasHeader
public void setHasHeader(boolean hasHeader) -
setLineEnd
-
setOutputStream
-
setQuote
public void setQuote(char quote) -
setQuoteAll
public void setQuoteAll(boolean quoteAll) -
setSeparator
public void setSeparator(char separator) -
setUseSeparator
public void setUseSeparator(boolean useSeparator) -
setWriter
-
toString
-
getSettings
- Specified by:
getSettings
in classStructuredFileSettings
-