| java.lang.Object java.io.Writer javax.servlet.jsp.JspWriter org.apache.jasper.runtime.JspWriterImpl
JspWriterImpl | public class JspWriterImpl extends JspWriter (Code) | | Write text to a character-output stream, buffering characters so as
to provide for the efficient writing of single characters, arrays,
and strings.
Provide support for discarding for the output that has been
buffered.
This needs revisiting when the buffering problems in the JSP spec
are fixed -akv
author: Anil K. Vijendran |
Method Summary | |
final public void | clear() Discard the output buffer. | public void | clearBuffer() | public void | close() Close the stream. | public void | flush() Flush the stream. | final protected void | flushBuffer() Flush the output buffer to the underlying character stream, without
flushing the stream itself. | public int | getRemaining() | void | init(ServletResponse response, int sz, boolean autoFlush) | public void | newLine() Write a line separator. | public void | print(boolean b) Print a boolean value. | public void | print(char c) Print a character. | public void | print(int i) Print an integer. | public void | print(long l) Print a long integer. | public void | print(float f) Print a floating-point number. | public void | print(double d) Print a double-precision floating-point number. | public void | print(char s) Print an array of characters. | public void | print(String s) Print a string. | public void | print(Object obj) Print an object. | public void | println() Terminate the current line by writing the line separator string. | public void | println(boolean x) Print a boolean value and then terminate the line. | public void | println(char x) Print a character and then terminate the line. | public void | println(int x) Print an integer and then terminate the line. | public void | println(long x) Print a long integer and then terminate the line. | public void | println(float x) Print a floating-point number and then terminate the line. | public void | println(double x) Print a double-precision floating-point number and then terminate the
line. | public void | println(char x) Print an array of characters and then terminate the line. | public void | println(String x) Print a String and then terminate the line. | public void | println(Object x) Print an Object and then terminate the line. | void | recycle() | public void | write(int c) Write a single character. | public void | write(char cbuf, int off, int len) Write a portion of an array of characters.
Ordinarily this method stores characters from the given array into
this stream's buffer, flushing the buffer to the underlying stream as
needed. | public void | write(char buf) Write an array of characters. | public void | write(String s, int off, int len) Write a portion of a String. | public void | write(String s) Write a string. |
JspWriterImpl | public JspWriterImpl()(Code) | | |
JspWriterImpl | public JspWriterImpl(ServletResponse response)(Code) | | Create a buffered character-output stream that uses a default-sized
output buffer.
Parameters: response - A Servlet Response |
JspWriterImpl | public JspWriterImpl(ServletResponse response, int sz, boolean autoFlush)(Code) | | Create a new buffered character-output stream that uses an output
buffer of the given size.
Parameters: response - A Servlet Response Parameters: sz - Output-buffer size, a positive integer exception: IllegalArgumentException - If sz is <= 0 |
flushBuffer | final protected void flushBuffer() throws IOException(Code) | | Flush the output buffer to the underlying character stream, without
flushing the stream itself. This method is non-private only so that it
may be invoked by PrintStream.
|
getRemaining | public int getRemaining()(Code) | | the number of bytes unused in the buffer |
newLine | public void newLine() throws IOException(Code) | | Write a line separator. The line separator string is defined by the
system property line.separator, and is not necessarily a single
newline ('\n') character.
exception: IOException - If an I/O error occurs |
print | public void print(char c) throws IOException(Code) | | Print a character. The character is translated into one or more bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
JspWriterImpl.write(int) method.
Parameters: c - The char to be printed |
print | public void print(double d) throws IOException(Code) | | Print a double-precision floating-point number. The string produced by
java.lang.String.valueOf(double) is translated into
bytes according to the platform's default character encoding, and these
bytes are written in exactly the manner of the
JspWriterImpl.write(int) method.
Parameters: d - The double to be printed |
print | public void print(char s) throws IOException(Code) | | Print an array of characters. The characters are converted into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
JspWriterImpl.write(int)
method.
Parameters: s - The array of chars to be printed throws: NullPointerException - If s is null |
print | public void print(String s) throws IOException(Code) | | Print a string. If the argument is null then the string
"null" is printed. Otherwise, the string's characters are
converted into bytes according to the platform's default character
encoding, and these bytes are written in exactly the manner of the
JspWriterImpl.write(int) method.
Parameters: s - The String to be printed |
println | public void println() throws IOException(Code) | | Terminate the current line by writing the line separator string. The
line separator string is defined by the system property
line.separator , and is not necessarily a single newline
character ('\n' ).
Need to change this from PrintWriter because the default
println() writes to the sink directly instead of through the
write method...
|
recycle | void recycle()(Code) | | Package-level access
|
write | public void write(char cbuf, int off, int len) throws IOException(Code) | | Write a portion of an array of characters.
Ordinarily this method stores characters from the given array into
this stream's buffer, flushing the buffer to the underlying stream as
needed. If the requested length is at least as large as the buffer,
however, then this method will flush the buffer and write the characters
directly to the underlying stream. Thus redundant
DiscardableBufferedWriter s will not copy data unnecessarily.
Parameters: cbuf - A character array Parameters: off - Offset from which to start reading characters Parameters: len - Number of characters to write |
write | public void write(char buf) throws IOException(Code) | | Write an array of characters. This method cannot be inherited from the
Writer class because it must suppress I/O exceptions.
|
write | public void write(String s, int off, int len) throws IOException(Code) | | Write a portion of a String.
Parameters: s - String to be written Parameters: off - Offset from which to start reading characters Parameters: len - Number of characters to be written |
write | public void write(String s) throws IOException(Code) | | Write a string. This method cannot be inherited from the Writer class
because it must suppress I/O exceptions.
|
|
|