All Packages Class Hierarchy This Package Previous Next Index
Class javax.servlet.ServletOutputStream
java.lang.Object
|
+----java.io.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.
- Version:
- Servlet API 2.0
-
ServletOutputStream()
-
-
print(boolean)
- Writes a boolean.
-
print(char)
- Writes a single char.
-
print(double)
- Writes a double.
-
print(float)
- Writes a float.
-
print(int)
- Writes an int.
-
print(long)
- Writes a long.
-
print(String)
- Writes a String.
-
println()
- Writes a CRLF.
-
println(boolean)
- Writes a boolean followed by a CRLF.
-
println(char)
- Writes a single char followed by a CRLF.
-
println(double)
- Writes a double followed by a CRLF.
-
println(float)
- Writes a float followed by a CRLF.
-
println(int)
- Writes an int followed by a CRLF.
-
println(long)
- Writes a long followed by a CRLF.
-
println(String)
- Writes a String followed by a CRLF.
ServletOutputStream
protected ServletOutputStream()
print
public void print(String value) throws IOException
- Writes a String.
- Parameters:
- value - the String to be printed
- Throws: IOException
- if an I/O exception occurs
print
public void print(boolean value) throws IOException
- Writes a boolean.
- Parameters:
- value - the boolean to be printed
- Throws: IOException
- if an I/O exception occurs
print
public void print(char value) throws IOException
- Writes a single char.
- Parameters:
- value - the char to be printed
- Throws: IOException
- if an I/O exception occurs
print
public void print(int value) throws IOException
- Writes an int.
- Parameters:
- value - the int to be printed
- Throws: IOException
- if an I/O exception occurs
print
public void print(long value) throws IOException
- Writes a long.
- Parameters:
- value - the long to be printed
- Throws: IOException
- if an I/O exception occurs
print
public void print(float value) throws IOException
- Writes a float.
- Parameters:
- value - the float to be printed
- Throws: IOException
- if an I/O exception occurs
print
public void print(double value) throws IOException
- Writes a double.
- Parameters:
- value - the double to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println() throws IOException
- Writes a CRLF.
- Throws: IOException
- if an I/O exception occurs
println
public void println(String value) throws IOException
- Writes a String followed by a CRLF.
- Parameters:
- value - the String to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println(boolean value) throws IOException
- Writes a boolean followed by a CRLF.
- Parameters:
- value - the boolean to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println(char value) throws IOException
- Writes a single char followed by a CRLF.
- Parameters:
- value - the char to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println(int value) throws IOException
- Writes an int followed by a CRLF.
- Parameters:
- value - the int to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println(long value) throws IOException
- Writes a long followed by a CRLF.
- Parameters:
- value - the long to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println(float value) throws IOException
- Writes a float followed by a CRLF.
- Parameters:
- value - the float to be printed
- Throws: IOException
- if an I/O exception occurs
println
public void println(double value) throws IOException
- Writes a double followed by a CRLF.
- Parameters:
- value - the double to be printed
- Throws: IOException
- if an I/O exception occurs
All Packages Class Hierarchy This Package Previous Next Index