public final class CSVSettings extends StructuredFileSettings
deserializers, file, inputStream, reader
Constructor and Description |
---|
CSVSettings() |
Modifier and Type | Method and Description |
---|---|
CSVColumn |
addColumn(String name) |
CSVColumn |
addColumn(String name,
int length) |
CSVColumn |
addColumn(String name,
int start,
int length) |
void |
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 own
Deserializer |
Charset |
getCharset() |
CSVColumn |
getColumn(int index) |
CSVColumn |
getColumn(String name) |
List<CSVColumn> |
getColumns() |
String |
getCommentChar() |
EscapeMode |
getEscapeMode() |
String |
getLineEnd() |
OutputStream |
getOutputStream() |
char |
getQuote() |
char |
getSeparator() |
Map<Class<?>,Serializer> |
getSerializers() |
List<Pair<String,String>> |
getSettings() |
Writer |
getWriter() |
boolean |
isFixedWidth() |
boolean |
isHasHeader() |
boolean |
isQuoteAll() |
boolean |
isUseComment() |
boolean |
isUseSeparator() |
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 |
setWriter(Writer writer) |
String |
toString() |
addDeserializer, addDeserializer, checkLocked, getDeserializers, getFile, getInputStream, getReader, isComplete, isLocked, setFile, setInputStream, setLocked, setReader
public void addSerializer(Class<?> clazz, Serializer serializer)
Deserializer
clazz
- serializer
- public Charset getCharset()
getCharset
in class StructuredFileSettings
public CSVColumn getColumn(int index)
public List<CSVColumn> getColumns()
getColumns
in class StructuredFileSettings
public String getCommentChar()
public EscapeMode getEscapeMode()
public String getLineEnd()
public OutputStream getOutputStream()
public char getQuote()
public char getSeparator()
public Map<Class<?>,Serializer> getSerializers()
public Writer getWriter()
public boolean isFixedWidth()
public boolean isHasHeader()
public boolean isQuoteAll()
public boolean isUseComment()
public boolean isUseSeparator()
public void loadSettings(Element importdesc) throws InstantiationException, IllegalAccessException, ClassNotFoundException
loadSettings
in class StructuredFileSettings
InstantiationException
IllegalAccessException
ClassNotFoundException
public void setCharset(Charset charset)
charset
- the charset to setpublic void setCommentChar(String commentChar)
public void setEscapeMode(EscapeMode escapeMode)
public void setFixedWidth(boolean fixedWidth)
public void setHasHeader(boolean hasHeader)
public void setLineEnd(String lineEnd)
public void setOutputStream(OutputStream outputStream)
public void setQuote(char quote)
public void setQuoteAll(boolean quoteAll)
public void setSeparator(char separator)
public void setUseSeparator(boolean useSeparator)
public void setWriter(Writer writer)
public List<Pair<String,String>> getSettings()
getSettings
in class StructuredFileSettings
@enterprise 10.0.38375 Copyright © 2001-2024 Groiss Informatics GmbH. All Rights Reserved.