public interface PagedMediaWriter
extends java.io.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(java.io.OutputStream os)
Open the PagedMediaWriter for writing.
|
void |
prepare(java.util.List<MetaDataItem> meta)
Adds additional metadata items.
|
void newVolume(SectionProperties props)
props - the section propertiesjava.lang.IllegalStateException - if writer is not opened or if writer has been closedvoid newSection(SectionProperties props)
props - the SectionProperties for this sectionjava.lang.IllegalStateException - if writer is not opened or if writer has been closedvoid newPage()
java.lang.IllegalStateException - if writer is not opened or if writer has been closedvoid newRow(Row row)
row - the rowjava.lang.IllegalStateException - if writer is not opened or if writer has been closedvoid newRow()
java.lang.IllegalStateException - if writer is not opened or if writer has been closedvoid prepare(java.util.List<MetaDataItem> meta)
meta - a list of metadatajava.lang.IllegalStateException - if writer has been openedvoid open(java.io.OutputStream os) throws PagedMediaWriterException
os - The underlying OutputStream for the PagedMediaWriterPagedMediaWriterException - throws an PagedMediaWriterException if the PagedMediaWriter could not be openedjava.lang.IllegalStateException - if writer has already been opened