Interface PagedMediaWriter

  • All Superinterfaces:
    AutoCloseable, Closeable

    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().

    • Method Detail

      • newVolume

        void newVolume​(SectionProperties props)
        Inserts a new volume in the output format, if applicable
        Parameters:
        props - the section properties
        Throws:
        IllegalStateException - if writer is not opened or if writer has been closed
      • newSection

        void newSection​(SectionProperties props)
        Insert a new section in the output format, if applicable
        Parameters:
        props - the SectionProperties for this section
        Throws:
        IllegalStateException - if writer is not opened or if writer has been closed
      • newPage

        void newPage()
        Inserts a new page in the output format, if applicable
        Throws:
        IllegalStateException - if writer is not opened or if writer has been closed
      • newRow

        void newRow​(Row row)
        Add a new row to the current page
        Parameters:
        row - the row
        Throws:
        IllegalStateException - if writer is not opened or if writer has been closed
      • newRow

        void newRow()
        Add a new empty row to the current page
        Throws:
        IllegalStateException - if writer is not opened or if writer has been closed
      • prepare

        void prepare​(List<MetaDataItem> meta)
        Adds additional metadata items. Must be called before opening the writer. Multiple calls to prepare will append to the existing list of metadata.
        Parameters:
        meta - a list of metadata
        Throws:
        IllegalStateException - if writer has been opened