public class CSVFactory extends Object
| Modifier | Constructor | Description |
|---|---|---|
protected |
CSVFactory() |
Creates the factory and initializes.
|
| Modifier and Type | Method | Description |
|---|---|---|
static CSVFactory |
getFactory() |
Returns the factory for rading/writing tables.
|
String |
getMimeType(File file) |
Returns the MIME type for the given file.
|
AbstractStreamTableReader |
getMimeTypeReader(String mimeType) |
Returns a reader for the given MIME type.
|
AbstractStreamTableWriter |
getMimeTypeWriter(String mimeType) |
Returns a writer for the given MIME type.
|
TableReader |
getReader(File file) |
Returns the correct reader for the given file.
|
TableReader |
getReader(String file) |
Returns the correct reader for the given file.
|
AbstractStreamTableWriter |
getWriter(File file) |
Returns the correct reader for the given file.
|
AbstractStreamTableWriter |
getWriter(String file) |
Returns the correct reader for the given file.
|
protected void |
init() |
Initializes the factory.
|
protected void |
initReaderMap() |
Initializes the reader map.
|
protected void |
initWriterMap() |
Initializes the writer map.
|
void |
register(MimeTypeInfo mimeTypeInfo) |
Registers a new MIME type.
|
public static CSVFactory getFactory()
protected void init()
protected void initReaderMap()
protected void initWriterMap()
public void register(MimeTypeInfo mimeTypeInfo)
mimeTypeInfo - the info to registerpublic TableReader getReader(String file) throws IOException
file - filenameIOException - when the file cannot be readpublic TableReader getReader(File file) throws IOException
file - fileIOException - when the file cannot be readpublic AbstractStreamTableReader getMimeTypeReader(String mimeType)
mimeType - MIME typepublic AbstractStreamTableWriter getWriter(String file) throws IOException
file - filenameIOException - when the file cannot be writtenpublic AbstractStreamTableWriter getWriter(File file) throws IOException
file - fileIOException - when the file cannot be writtenpublic AbstractStreamTableWriter getMimeTypeWriter(String mimeType)
mimeType - MIME typeCopyright © 2018. All rights reserved.