JavaScript is disabled on your browser.
javax.servlet.jsp

Class JspWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable
    Direct Known Subclasses:
    BodyContent


    public abstract class JspWriter
    extends java.io.Writer
    The output stream used by JSP engines.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected boolean autoFlush
      Whether the buffer is automatically flushed.
      protected int bufferSize
      Size of the buffer.
      static int DEFAULT_BUFFER
      The writer will buffer output using the default buffer size.
      static int NO_BUFFER
      The writer will not buffer output.
      static int UNBOUNDED_BUFFER
      The writer is buffered and unbounded.
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected JspWriter (int bufferSize, boolean autoFlush)
      Make a JSP io stream.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      abstract void clear ()
      Clears the contents of the buffer.
      abstract void clearBuffer ()
      Clears the contents of the buffer.
      abstract void close ()
      Flush and close the stream.
      abstract void flush ()
      Flush the buffer.
      int getBufferSize ()
      Returns the buffer size.
      abstract int getRemaining ()
      Returns the number of unused bytes in the buffer.
      boolean isAutoFlush ()
      Indicates whether the buffer will be flushed automatically.
      abstract void newLine ()
      Write a line separator.
      abstract void print (boolean b)
      Print a boolean value using String.valueOf(boolean).
      abstract void print (char c)
      Print a character.
      abstract void print (char[] s)
      Print the characters in the specified array.
      abstract void print (double d)
      Print a double using String.valueOf(double).
      abstract void print (float f)
      Print a float using String.valueOf(float).
      abstract void print (int i)
      Print an int using String.valueOf(int).
      abstract void print (long l)
      Print a long using String.valueOf(long).
      abstract void print (java.lang.Object o)
      Print an object using String.valueOf(java.lang.Object).
      abstract void print (java.lang.String s)
      Print a string.
      abstract void println ()
      Print a line separator.
      abstract void println (boolean b)
      Print a boolean value using String.valueOf(boolean), followed by a line separator.
      abstract void println (char c)
      Print a character, followed by a line separator.
      abstract void println (char[] cb)
      Print the characters in the specified array, followed by a line separator.
      abstract void println (double d)
      Print a double value using String.valueOf(double), followed by a line separator.
      abstract void println (float f)
      Print a float value using String.valueOf(float), followed by a line separator.
      abstract void println (int i)
      Print an int value using String.valueOf(int), followed by a line separator.
      abstract void println (long l)
      Print a long value using String.valueOf(long), followed by a line separator.
      abstract void println (java.lang.Object o)
      Print an object using String.valueOf(java.lang.Object), followed by a line separator.
      abstract void println (java.lang.String s)
      Print a string, or the string "null" if the string is null, followed by a line separator.
      • Methods inherited from class java.io.Writer

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

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

      • NO_BUFFER

        public static final int NO_BUFFER
        The writer will not buffer output.
        See Also:
        Constant Field Values
      • DEFAULT_BUFFER

        public static final int DEFAULT_BUFFER
        The writer will buffer output using the default buffer size.
        See Also:
        Constant Field Values
      • UNBOUNDED_BUFFER

        public static final int UNBOUNDED_BUFFER
        The writer is buffered and unbounded.
        See Also:
        Constant Field Values
      • bufferSize

        protected int bufferSize
        Size of the buffer.
      • autoFlush

        protected boolean autoFlush
        Whether the buffer is automatically flushed.
    • Constructor Detail

      • JspWriter

        protected JspWriter(int bufferSize,
         boolean autoFlush)
        Make a JSP io stream.
    • Method Detail

      • newLine

        public abstract void newLine()
         throws java.io.IOException
        Write a line separator.
        Throws:
        java.io.IOException
      • print

        public abstract void print(boolean b)
         throws java.io.IOException
        Print a boolean value using String.valueOf(boolean).
        Throws:
        java.io.IOException
      • print

        public abstract void print(char c)
         throws java.io.IOException
        Print a character.
        Throws:
        java.io.IOException
      • print

        public abstract void print(int i)
         throws java.io.IOException
        Print an int using String.valueOf(int).
        Throws:
        java.io.IOException
      • print

        public abstract void print(long l)
         throws java.io.IOException
        Print a long using String.valueOf(long).
        Throws:
        java.io.IOException
      • print

        public abstract void print(float f)
         throws java.io.IOException
        Print a float using String.valueOf(float).
        Throws:
        java.io.IOException
      • print

        public abstract void print(double d)
         throws java.io.IOException
        Print a double using String.valueOf(double).
        Throws:
        java.io.IOException
      • print

        public abstract void print(char[] s)
         throws java.io.IOException
        Print the characters in the specified array.
        Throws:
        java.lang.NullPointerException - if the array is null
        java.io.IOException
      • print

        public abstract void print(java.lang.String s)
         throws java.io.IOException
        Print a string. If the string is null then the string "null" is printed.
        Throws:
        java.io.IOException
      • print

        public abstract void print(java.lang.Object o)
         throws java.io.IOException
        Print an object using String.valueOf(java.lang.Object).
        Throws:
        java.io.IOException
      • println

        public abstract void println()
         throws java.io.IOException
        Print a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(boolean b)
         throws java.io.IOException
        Print a boolean value using String.valueOf(boolean), followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(char c)
         throws java.io.IOException
        Print a character, followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(int i)
         throws java.io.IOException
        Print an int value using String.valueOf(int), followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(long l)
         throws java.io.IOException
        Print a long value using String.valueOf(long), followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(float f)
         throws java.io.IOException
        Print a float value using String.valueOf(float), followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(double d)
         throws java.io.IOException
        Print a double value using String.valueOf(double), followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(char[] cb)
         throws java.io.IOException
        Print the characters in the specified array, followed by a line separator.
        Throws:
        java.lang.NullPointerException - if the array is null
        java.io.IOException
      • println

        public abstract void println(java.lang.String s)
         throws java.io.IOException
        Print a string, or the string "null" if the string is null, followed by a line separator.
        Throws:
        java.io.IOException
      • println

        public abstract void println(java.lang.Object o)
         throws java.io.IOException
        Print an object using String.valueOf(java.lang.Object), followed by a line separator.
        Throws:
        java.io.IOException
      • clear

        public abstract void clear()
         throws java.io.IOException
        Clears the contents of the buffer. If data has been flushed already, throws an IOException.
        Throws:
        java.io.IOException
      • clearBuffer

        public abstract void clearBuffer()
         throws java.io.IOException
        Clears the contents of the buffer. This will not throw IOException if the buffer has been flushed.
        Throws:
        java.io.IOException
      • flush

        public abstract void flush()
         throws java.io.IOException
        Flush the buffer.
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class java.io.Writer
        Throws:
        java.io.IOException
      • close

        public abstract void close()
         throws java.io.IOException
        Flush and close the stream. The JSP container will automatically generate a call to this method to terminate the page.
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in class java.io.Writer
        Throws:
        java.io.IOException
      • getBufferSize

        public int getBufferSize()
        Returns the buffer size.
      • getRemaining

        public abstract int getRemaining()
        Returns the number of unused bytes in the buffer.
      • isAutoFlush

        public boolean isAutoFlush()
        Indicates whether the buffer will be flushed automatically.

AltStyle によって変換されたページ (->オリジナル) /