Class PEFMediaWriter
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.writer.PEFMediaWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,PagedMediaWriter
public class PEFMediaWriter extends Object implements PagedMediaWriter
PagedMediaWriter implementation that outputs PEF 2008-1.
-
-
Constructor Summary
Constructors Constructor Description PEFMediaWriter()
Create a new PEFMediaWriter using the supplied Properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
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 master)
Insert a new section in the output format, if applicable.void
newVolume(SectionProperties master)
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.
-
-
-
Method Detail
-
prepare
public void prepare(List<MetaDataItem> meta)
Description copied from interface:PagedMediaWriter
Adds additional metadata items. Must be called before opening the writer. Multiple calls to prepare will append to the existing list of metadata.- Specified by:
prepare
in interfacePagedMediaWriter
- Parameters:
meta
- a list of metadata
-
open
public void open(OutputStream os) throws PagedMediaWriterException
Description copied from interface:PagedMediaWriter
Open the PagedMediaWriter for writing. Must be called before writing to the writer.- Specified by:
open
in interfacePagedMediaWriter
- Parameters:
os
- The underlying OutputStream for the PagedMediaWriter- Throws:
PagedMediaWriterException
- throws an PagedMediaWriterException if the PagedMediaWriter could not be opened
-
newPage
public void newPage()
Description copied from interface:PagedMediaWriter
Inserts a new page in the output format, if applicable.- Specified by:
newPage
in interfacePagedMediaWriter
-
newRow
public void newRow(Row row)
Description copied from interface:PagedMediaWriter
Add a new row to the current page.- Specified by:
newRow
in interfacePagedMediaWriter
- Parameters:
row
- the row
-
newRow
public void newRow()
Description copied from interface:PagedMediaWriter
Add a new empty row to the current page.- Specified by:
newRow
in interfacePagedMediaWriter
-
newVolume
public void newVolume(SectionProperties master)
Description copied from interface:PagedMediaWriter
Inserts a new volume in the output format, if applicable.- Specified by:
newVolume
in interfacePagedMediaWriter
- Parameters:
master
- the section properties
-
newSection
public void newSection(SectionProperties master)
Description copied from interface:PagedMediaWriter
Insert a new section in the output format, if applicable.- Specified by:
newSection
in interfacePagedMediaWriter
- Parameters:
master
- the SectionProperties for this section
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-