public abstract class ServletOutputStream
extends java.io.OutputStream
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.
| Modifier | Constructor and Description |
|---|---|
protected |
ServletOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
print(boolean b)
Prints a boolean value to output.
|
void |
print(char c)
Prints a character to the output.
|
void |
print(double d)
Prints a double to the output.
|
void |
print(float f)
Prints a float to the output.
|
void |
print(int i)
Prints an integer to the output.
|
void |
print(long l)
Prints a long to the output.
|
void |
print(java.lang.String s)
Prints a string to the stream.
|
void |
println()
Prints a newline to the output.
|
void |
println(boolean b)
Prints a boolean to the output, followed by a newline.
|
void |
println(char c)
Prints a character to the output, followed by a newline.
|
void |
println(double d)
Prints a double to the output, followed by a newline.
|
void |
println(float f)
Prints a float to the output, followed by a newline.
|
void |
println(int i)
Prints an integer to the output, followed by a newline.
|
void |
println(long l)
Prints a long to the output, followed by a newline.
|
void |
println(java.lang.String s)
Prints a string to the output, followed by a newline.
|
public void print(java.lang.String s)
throws java.io.IOException
s - the string to write.java.io.IOExceptionpublic void print(boolean b)
throws java.io.IOException
b - the boolean valuejava.io.IOExceptionpublic void print(char c)
throws java.io.IOException
c - the character valuejava.io.IOExceptionpublic void print(int i)
throws java.io.IOException
i - the integer valuejava.io.IOExceptionpublic void print(long l)
throws java.io.IOException
l - the long valuejava.io.IOExceptionpublic void print(float f)
throws java.io.IOException
f - the float valuejava.io.IOExceptionpublic void print(double d)
throws java.io.IOException
d - the double valuejava.io.IOExceptionpublic void println()
throws java.io.IOException
java.io.IOExceptionpublic void println(java.lang.String s)
throws java.io.IOException
s - the string valuejava.io.IOExceptionpublic void println(boolean b)
throws java.io.IOException
b - the boolean valuejava.io.IOExceptionpublic void println(char c)
throws java.io.IOException
c - the character valuejava.io.IOExceptionpublic void println(int i)
throws java.io.IOException
i - the integer valuejava.io.IOExceptionpublic void println(long l)
throws java.io.IOException
l - the long valuejava.io.IOExceptionpublic void println(float f)
throws java.io.IOException
f - the float valuejava.io.IOExceptionpublic void println(double d)
throws java.io.IOException
d - the double valuejava.io.IOException