org.apache.struts.util
public class ServletContextWriter extends PrintWriter
javax.servlet.ServletContext
to output its results. Output
will be buffered until a newline character is output, flush()
is called, or until one of the println()
methods is called.
Along the way, carriage return characters are skipped.
Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
Field Summary | |
---|---|
protected StringBuffer | buffer
The buffer into which we accumulate lines to be logged. |
protected ServletContext | context
The servlet context with which we are associated. |
protected boolean | error
The error state for this stream. |
Constructor Summary | |
---|---|
ServletContextWriter(ServletContext context)
Construct a ServletContextWriter associated with the specified
ServletContext instance.
|
Method Summary | |
---|---|
boolean | checkError()
Flush the stream and check for its error state. |
void | close()
Close the stream. |
void | flush()
Flush the stream. |
void | print(boolean b)
Print a boolean value.
|
void | print(char c)
Print a character value.
|
void | print(char[] c)
Print a character array.
|
void | print(double d)
Print a double value.
|
void | print(float f)
Print a float value.
|
void | print(int i)
Print an integer value.
|
void | print(long l)
Print a long value.
|
void | print(Object o)
Print an object.
|
void | print(String s)
Print a String value.
|
void | println()
Terminate the current line and flush the buffer. |
void | println(boolean b)
Print a boolean value and terminate the line.
|
void | println(char c)
Print a character value and terminate the line.
|
void | println(char[] c)
Print a character array and terminate the line.
|
void | println(double d)
Print a double value and terminate the line.
|
void | println(float f)
Print a float value and terminate the line.
|
void | println(int i)
Print an integer value and terminate the line.
|
void | println(long l)
Print a long value and terminate the line.
|
void | println(Object o)
Print an object and terminate the line.
|
void | println(String s)
Print a String value and terminate the line.
|
void | setError()
Set the error state for this stream. |
void | write(char c)
Write a single character to this stream.
|
void | write(int c)
Write a single character to this stream.
|
void | write(char[] buf)
Write an array of charaters to this stream.
|
void | write(char[] buf, int off, int len)
Write the specified subset of an array of characters to this stream.
|
void | write(String s)
Write a String to this stream.
|
void | write(String s, int off, int len)
Write the specified portion of a String to this stream.
|
Parameters: context The associated servlet context
true
is if setError()
is called.Parameters: b The value to be printed
Parameters: c The value to be printed
Parameters: c The character array to be printed
Parameters: d The value to be printed
Parameters: f The value to be printed
Parameters: i The value to be printed
Parameters: l The value to be printed
Parameters: o The value to be printed
Parameters: s The value to be printed
Parameters: b The value to be printed
Parameters: c The value to be printed
Parameters: c The character array to be printed
Parameters: d The value to be printed
Parameters: f The value to be printed
Parameters: i The value to be printed
Parameters: l The value to be printed
Parameters: o The value to be printed
Parameters: s The value to be printed
Parameters: c The character to be written
Parameters: c The character to be written
Parameters: buf The character array to be written
Parameters: buf The character array from which to write off The zero-relative starting offset to write len The number of characters to write
Parameters: s The string to be written
Parameters: s The String from which to write off The zero-relative starting offset to write len The number of characters to write