public interface PagedMediaWriter extends Closeable
PagedMediaWriter is an interface for writing to a paged media.
An implementation of PagedMediaWriter is responsible for writing volumes, sections, pages and rows in a specific format.
The PagedMediaWriter must not alter the input structure.
For example, an implementation of PagedMediaWriter must not break
a page unless instructed via newPage().
| Modifier and Type | Method and Description |
|---|---|
void |
newPage()
Inserts a new page in the output format,
if applicable
|
void |
newRow()
Add a new empty row to the current page
|
void |
newRow(Row row)
Add a new row to the current page
|
void |
newSection(SectionProperties props)
Insert a new section in the output format,
if applicable
|
void |
newVolume(SectionProperties props)
Inserts a new volume in the output format,
if applicable
|
void |
open(OutputStream os)
Open the PagedMediaWriter for writing.
|
void |
prepare(List<MetaDataItem> meta)
Adds additional metadata items.
|
void newVolume(SectionProperties props)
props - the section propertiesIllegalStateException - if writer is not opened or if writer has been closedvoid newSection(SectionProperties props)
props - the SectionProperties for this sectionIllegalStateException - if writer is not opened or if writer has been closedvoid newPage()
IllegalStateException - if writer is not opened or if writer has been closedvoid newRow(Row row)
row - the rowIllegalStateException - if writer is not opened or if writer has been closedvoid newRow()
IllegalStateException - if writer is not opened or if writer has been closedvoid prepare(List<MetaDataItem> meta)
meta - a list of metadataIllegalStateException - if writer has been openedvoid open(OutputStream os) throws PagedMediaWriterException
os - The underlying OutputStream for the PagedMediaWriterPagedMediaWriterException - throws an PagedMediaWriterException if the PagedMediaWriter could not be openedIllegalStateException - if writer has already been opened