public class CSVFactory extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
CSVFactory()
Creates the factory and initializes.
|
| Modifier and Type | Method and 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 - filenameIOExceptionpublic TableReader getReader(File file) throws IOException
file - fileIOExceptionpublic AbstractStreamTableReader getMimeTypeReader(String mimeType)
mimeType - MIME typepublic AbstractStreamTableWriter getWriter(String file) throws IOException
file - filenameIOExceptionpublic AbstractStreamTableWriter getWriter(File file) throws IOException
file - fileIOExceptionpublic AbstractStreamTableWriter getMimeTypeWriter(String mimeType)
mimeType - MIME typeCopyright © 2014. All rights reserved.