public class DefaultDumpHandler extends AbstractDumpHandler
DumpHeader using plain files as dump storage.| Constructor and Description |
|---|
DefaultDumpHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected CSVReader |
createReader()
Creates a new reader using last dump file as input.
|
protected CSVWriter |
createWriter()
Creates a new writer using a new created temp file as current dump file.
|
protected void |
deleteCurrentDump()
Deletes the file holding the current dump.
|
protected void |
deleteLastDump()
Deletes the file holding the last dump.
|
void |
finish(boolean saveCurrentDump)
Deletes last dump storage definitely and current one if given flag is set.
|
File |
getDumpAsFile()
Gets the current dump as file.
|
ImpExMedia |
getDumpAsMedia()
Gets the current dump as media object.
|
void |
init()
Initializes the handler by creating the first dump storage and providing a writer object to that storage when
calling
DumpHandler.getWriterOfCurrentDump(). |
protected void |
switchCurrentToLastDump()
Switches the reference of current dump file to last dump file.
|
void |
switchDump()
References the 'current' dump storage as 'last' dump storage (
DumpHandler.getReaderOfLastDump() now provides a reader
object to that storage) and creates a new 'current' dump storage (DumpHandler.getWriterOfCurrentDump() now provides a
writer object to that storage). |
getDumpAsString, getReaderOfLastDump, getWriterOfCurrentDump, setReaderOfLastDump, setWriterOfCurrentDumppublic void init()
throws IOException
DumpHandlerDumpHandler.getWriterOfCurrentDump().IOException - error while storage creationpublic void finish(boolean saveCurrentDump)
DumpHandlersaveCurrentDump - should the current storage be deletedpublic void switchDump()
throws ImpExException
DumpHandlerDumpHandler.getReaderOfLastDump() now provides a reader
object to that storage) and creates a new 'current' dump storage (DumpHandler.getWriterOfCurrentDump() now provides a
writer object to that storage). If there was a storage referenced by 'last' it will be deleted.ImpExException - error while storage handlingpublic File getDumpAsFile()
DumpHandlergetDumpAsFile in interface DumpHandlergetDumpAsFile in class AbstractDumpHandlerpublic ImpExMedia getDumpAsMedia()
DumpHandlergetDumpAsMedia in interface DumpHandlergetDumpAsMedia in class AbstractDumpHandlerprotected void deleteLastDump()
protected void deleteCurrentDump()
protected void switchCurrentToLastDump()
protected CSVReader createReader() throws IOException
IOException - error while accessing fileprotected CSVWriter createWriter() throws IOException
IOException - error while accessing fileCopyright © 2017 SAP SE. All Rights Reserved.