| java.lang.Object java.io.OutputStream javax.servlet.ServletOutputStream
ServletOutputStream | abstract public class ServletOutputStream extends OutputStream (Code) | | Servlets can use ServletOutputStream to write binary data to
the response. ServletOutputStream provides several methods similar
to the methods of PrintWriter.
Typically, servlets will use response.getOutputStream to get
this object.
Note, the PrintWriter-like methods do not handle character
encoding properly. If you need non-ascii character output, use
getWriter().
Buffering of the output stream is controlled by the Response object.
|
Method Summary | |
public void | print(String s) Prints a string to the stream. | public void | print(boolean b) Prints a boolean value to output. | public void | print(char c) Prints a character to the output. | public void | print(int i) Prints an integer to the output. | public void | print(long l) Prints a long to the output. | public void | print(float f) Prints a float to the output. | public void | print(double d) Prints a double to the output. | public void | println() Prints a newline to the output. | public void | println(String s) Prints a string to the output, followed by a newline. | public void | println(boolean b) Prints a boolean to the output, followed by a newline. | public void | println(char c) Prints a character to the output, followed by a newline. | public void | println(int i) Prints an integer to the output, followed by a newline. | public void | println(long l) Prints a long to the output, followed by a newline. | public void | println(float f) Prints a float to the output, followed by a newline. | public void | println(double d) Prints a double to the output, followed by a newline. |
print | public void print(String s) throws IOException(Code) | | Prints a string to the stream. Note, this method does not properly
handle character encoding.
Parameters: s - the string to write. |
print | public void print(boolean b) throws IOException(Code) | | Prints a boolean value to output.
Parameters: b - the boolean value |
print | public void print(char c) throws IOException(Code) | | Prints a character to the output. Note, this doesn't handle
character encoding properly.
Parameters: c - the character value |
print | public void print(int i) throws IOException(Code) | | Prints an integer to the output.
Parameters: i - the integer value |
print | public void print(long l) throws IOException(Code) | | Prints a long to the output.
Parameters: l - the long value |
print | public void print(float f) throws IOException(Code) | | Prints a float to the output.
Parameters: f - the float value |
print | public void print(double d) throws IOException(Code) | | Prints a double to the output.
Parameters: d - the double value |
println | public void println() throws IOException(Code) | | Prints a newline to the output.
|
println | public void println(String s) throws IOException(Code) | | Prints a string to the output, followed by a newline. Note,
character encoding is not properly handled.
Parameters: s - the string value |
println | public void println(boolean b) throws IOException(Code) | | Prints a boolean to the output, followed by a newline.
Parameters: b - the boolean value |
println | public void println(char c) throws IOException(Code) | | Prints a character to the output, followed by a newline. Note,
character encoding is not properly handled.
Parameters: c - the character value |
println | public void println(int i) throws IOException(Code) | | Prints an integer to the output, followed by a newline.
Parameters: i - the integer value |
println | public void println(long l) throws IOException(Code) | | Prints a long to the output, followed by a newline.
Parameters: l - the long value |
println | public void println(float f) throws IOException(Code) | | Prints a float to the output, followed by a newline.
Parameters: f - the float value |
println | public void println(double d) throws IOException(Code) | | Prints a double to the output, followed by a newline.
Parameters: d - the double value |
|
|