Class ThrottledTemplateWriterWriterAdapter

    • Field Detail

      • OVERFLOW_BUFFER_INCREMENT

        private static int OVERFLOW_BUFFER_INCREMENT
      • templateName

        private final java.lang.String templateName
      • writer

        private java.io.Writer writer
      • overflow

        private char[] overflow
      • overflowSize

        private int overflowSize
      • maxOverflowSize

        private int maxOverflowSize
      • overflowGrowCount

        private int overflowGrowCount
      • unlimited

        private boolean unlimited
      • limit

        private int limit
      • writtenCount

        private int writtenCount
    • Constructor Detail

      • ThrottledTemplateWriterWriterAdapter

        ThrottledTemplateWriterWriterAdapter​(java.lang.String templateName,
                                             TemplateFlowController flowController)
    • Method Detail

      • setWriter

        void setWriter​(java.io.Writer writer)
      • write

        public void write​(int c)
                   throws java.io.IOException
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public void write​(java.lang.String str)
                   throws java.io.IOException
        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
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public void write​(char[] cbuf)
                   throws java.io.IOException
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • 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
      • overflow

        private void overflow​(int c)
      • overflow

        private void overflow​(java.lang.String str,
                              int off,
                              int len)
      • overflow

        private void overflow​(char[] cbuf,
                              int off,
                              int len)
      • ensureOverflowCapacity

        private void ensureOverflowCapacity​(int len)
      • 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