Class JspWriterMockup

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

    public class JspWriterMockup
    extends javax.servlet.jsp.JspWriter
    JSP writer that simply writes to a public string writer.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.io.StringWriter sw  
      • Fields inherited from class javax.servlet.jsp.JspWriter

        autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      JspWriterMockup()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      void clearBuffer()  
      void close()  
      void flush()  
      int getRemaining()  
      void newLine()  
      void print​(boolean b)  
      void print​(char c)  
      void print​(char[] chars)  
      void print​(double v)  
      void print​(float v)  
      void print​(int i)  
      void print​(long l)  
      void print​(java.lang.Object object)  
      void print​(java.lang.String string)  
      void println()  
      void println​(boolean b)  
      void println​(char c)  
      void println​(char[] chars)  
      void println​(double v)  
      void println​(float v)  
      void println​(int i)  
      void println​(long l)  
      void println​(java.lang.Object object)  
      void println​(java.lang.String string)  
      void write​(char[] cbuf, int off, int len)  
      • Methods inherited from class javax.servlet.jsp.JspWriter

        getBufferSize, isAutoFlush
      • Methods inherited from class java.io.Writer

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

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

      • sw

        public java.io.StringWriter sw
    • Method Detail

      • newLine

        public void newLine()
                     throws java.io.IOException
        Specified by:
        newLine in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(boolean b)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(char c)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(int i)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(long l)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(float v)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(double v)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(char[] chars)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(java.lang.String string)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • print

        public void print​(java.lang.Object object)
                   throws java.io.IOException
        Specified by:
        print in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println()
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(boolean b)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(char c)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(int i)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(long l)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(float v)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(double v)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(char[] chars)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(java.lang.String string)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • println

        public void println​(java.lang.Object object)
                     throws java.io.IOException
        Specified by:
        println in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • clear

        public void clear()
                   throws java.io.IOException
        Specified by:
        clear in class javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • clearBuffer

        public void clearBuffer()
                         throws java.io.IOException
        Specified by:
        clearBuffer in class javax.servlet.jsp.JspWriter
        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
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class javax.servlet.jsp.JspWriter
        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 javax.servlet.jsp.JspWriter
        Throws:
        java.io.IOException
      • getRemaining

        public int getRemaining()
        Specified by:
        getRemaining in class javax.servlet.jsp.JspWriter