| Modifier and Type | Field and Description |
|---|---|
protected List<IqmDataBox> |
boxes |
protected File |
destination |
protected String |
extension |
private static org.apache.log4j.Logger |
logger |
protected int |
mode |
static int |
MODE_SEQUENCE
Saves a table as sequence with increasing numbers.
|
static int |
MODE_SINGLE
Saves a table as single file.
|
private ArrayList<String> |
storedFileNames |
protected Object |
tableData |
| Modifier | Constructor and Description |
|---|---|
|
TableFileWriter(File destination,
IqmDataBox table,
String extension)
Create a new file writer object for a single table.
|
|
TableFileWriter(File destination,
List<IqmDataBox> boxes,
String extension,
int mode)
Create a new file writer object for a sequence of tables.
|
|
TableFileWriter(File destination,
Object tableData,
String extension)
Create a new file writer object for a single table.
|
private |
TableFileWriter(int mode)
Creates a new object in the specified mode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
protected void |
write()
Writes a single table to the destination file.
|
protected void |
writeSequence()
Writes multiple tables to files with increasing numbering.
|
private static final org.apache.log4j.Logger logger
public static final int MODE_SINGLE
public static final int MODE_SEQUENCE
protected File destination
protected String extension
protected int mode
protected Object tableData
protected List<IqmDataBox> boxes
private TableFileWriter(int mode)
mode - one of MODE_SINGLE or MODE_SEQUENCEpublic TableFileWriter(File destination, Object tableData, String extension)
tableData determines whether the model is exported or not.
If tableData is an instance of JTable, then the entire
POJO is serialized.
destination - the target filetableData - the table data, which may either be a full JTable
object or a TableModelextension - the extension of the target filepublic TableFileWriter(File destination, List<IqmDataBox> boxes, String extension, int mode)
If tableData is an instance of JTable, then the entire
POJO is serialized.
destination - the target fileboxes - the IqmDataBox list containing the tablesextension - the extension of the target filesmode - the mode, which is required to be MODE_SEQUENCEIllegalArgumentException - if mode equals MODE_SINGLEpublic TableFileWriter(File destination, IqmDataBox table, String extension)
destination - the target filetable - a IqmDataBox containing the tableextension - the extension of the target filesprotected void write()
throws IOException
IOExceptionprotected void writeSequence()
throws IOException
IOExceptionCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.