Class VelocityGenerator.RedirectingWriter

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

    static class VelocityGenerator.RedirectingWriter
    extends java.io.Writer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.io.Writer current  
      (package private) java.nio.file.Path dir  
      (package private) java.lang.StringBuilder sb  
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      RedirectingWriter​(java.nio.file.Path dir)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void flush()  
      void write​(char[] cbuf, int off, int len)  
      protected void writeLine​(java.lang.String line)  
      • Methods inherited from class java.io.Writer

        append, append, append, write, write, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dir

        java.nio.file.Path dir
      • sb

        java.lang.StringBuilder sb
      • current

        java.io.Writer current
    • Constructor Detail

      • RedirectingWriter

        RedirectingWriter​(java.nio.file.Path dir)
    • Method Detail

      • write

        public void write​(char[] cbuf,
                          int off,
                          int len)
                   throws java.io.IOException
        Specified by:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • writeLine

        protected void writeLine​(java.lang.String line)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        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
        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