javax.servlet
Class ServletOutputStream
OutputStream
javax.servlet.ServletOutputStream
public abstract class ServletOutputStream
extends OutputStream
Used to write output from a Servlet to the client.
Servlet engines should provide a subclass of ServletOutputStream that
implements
OutputStream.write(int)
.
Note that I (MJW) do not understand how the
print
methods work
when the stream uses something else then a simple ASCII character encoding.
It seems saver to use
ServletResponse.getWriter()
for all
output that is not binary.
void | print(String value) - Writes a String.
|
void | print(boolean value) - Writes a boolean.
|
void | print(char value) - Writes a single char.
|
void | print(double value) - Writes a double.
|
void | print(float value) - Writes a float.
|
void | print(int value) - Writes an int.
|
void | print(long value) - Writes a long.
|
void | println() - Writes a CRLF.
|
void | println(String value) - Writes a String followed by a CRLF.
|
void | println(boolean value) - Writes a boolean followed by a CRLF.
|
void | println(char value) - Writes a single char followed by a CRLF.
|
void | println(double value) - Writes a double followed by a CRLF.
|
void | println(float value) - Writes a float followed by a CRLF.
|
void | println(int value) - Writes an int followed by a CRLF.
|
void | println(long value) - Writes a long followed by a CRLF.
|
ServletOutputStream
protected ServletOutputStream()
print
public void print(String value)
throws IOException
Writes a String.
value
- the String to be printed
print
public void print(boolean value)
throws IOException
Writes a boolean.
value
- the boolean to be printed
print
public void print(char value)
throws IOException
Writes a single char.
value
- the char to be printed
print
public void print(double value)
throws IOException
Writes a double.
value
- the double to be printed
print
public void print(float value)
throws IOException
Writes a float.
value
- the float to be printed
print
public void print(int value)
throws IOException
Writes an int.
value
- the int to be printed
print
public void print(long value)
throws IOException
Writes a long.
value
- the long to be printed
println
public void println()
throws IOException
Writes a CRLF.
println
public void println(String value)
throws IOException
Writes a String followed by a CRLF.
value
- the String to be printed
println
public void println(boolean value)
throws IOException
Writes a boolean followed by a CRLF.
value
- the boolean to be printed
println
public void println(char value)
throws IOException
Writes a single char followed by a CRLF.
value
- the char to be printed
println
public void println(double value)
throws IOException
Writes a double followed by a CRLF.
value
- the double to be printed
println
public void println(float value)
throws IOException
Writes a float followed by a CRLF.
value
- the float to be printed
println
public void println(int value)
throws IOException
Writes an int followed by a CRLF.
value
- the int to be printed
println
public void println(long value)
throws IOException
Writes a long followed by a CRLF.
value
- the long to be printed