Class ModelWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public class ModelWriter
    extends java.io.Writer

    An extension of the Writer class that is used with the ExtensibilityModel. Rather than writing directly to an output stream this writes to ExtensibilityContent instances in the ExtensibilityModel. This allows rendered content to be removed, replaced or added to as extensions to the model are processed.

    Author:
    David Draper
    • Constructor Detail

      • ModelWriter

        public ModelWriter()
    • Method Detail

      • write

        public void write​(char[] cbuf,
                          int off,
                          int len)
                   throws java.io.IOException

        Writes to the current ExtensibilityContent instance.

        Specified by:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException

        Flushes the current ExtensibilityContent instance.

        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class java.io.Writer
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException

        Closes the current ExtensibilityContent instance.

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public void write​(int c)
                   throws java.io.IOException

        Writes to the current ExtensibilityContent instance.

        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public void write​(java.lang.String str,
                          int off,
                          int len)
                   throws java.io.IOException

        Writes to the current ExtensibilityContent instance.

        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException