Package cdc.issues.io
Interface IssuesStreamWriter
- All Superinterfaces:
AutoCloseable,Closeable,Flushable
Interface implemented by classes that can be used to save issues at a low level.
One must use IssuesIoFactory.createIssuesStreamWriter(File, OutSettings)
or IssuesIoFactory.createIssuesStreamWriter(OutputStream, IssuesFormat, OutSettings)
to create an instance of IssuesStreamWriter.
WARNING: all issues should be generated together.
A typical usage would be:
IssuesStreamWriter w = ...
w.startDocument()
w.add(snapshot)
foreach issue
w.add(issue)
w.endDocument()
Note: with formats that have limitations (typically workbook sheets have a max number of rows), solutions should be provided to bypass them (using several sheets for example).
- Author:
- Damien Carbonne
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SnapshotData snapshot) Invoked to generate snapshot data.default voidInvoked to generate issue data.voidadd(Issue issue, IssueAnswer answer) Invoked to generate issue and answer data.voidMust be invoked last.voidMust be invoked first.
-
Method Details
-
startDocument
Must be invoked first.- Throws:
IOException- When an IO error occurs.
-
add
Invoked to generate snapshot data.- Parameters:
snapshot- The snapshot data.- Throws:
IOException- When an IO error occurs.
-
add
Invoked to generate issue and answer data.- Parameters:
issue- The issue.answer- The associated answer.- Throws:
IOException- When an IO error occurs.
-
add
Invoked to generate issue data.- Parameters:
issue- The issue.- Throws:
IOException- When an IO error occurs.
-
endDocument
Must be invoked last.- Throws:
IOException- When an IO error occurs.
-