November 1998
Intermediate to advanced
526 pages
14h 38m
English
ServletOutputStream
Class Name: javax.servlet.ServletOutputStream
Superclass: java.io.OutputStream
Immediate Subclasses: None
Interfaces Implemented: None
Availability: Servlet API 1.0 and later
Provides an output stream for sending binary data back to a client. A
servlet obtains a ServletOutputStream object from
the getOutputStream() method of
ServletResponse. Although it includes a range of
print() and println() methods
for sending text or HTML, the ServletOutputStream
has been superseded by PrintWriter. It should be
used only for sending binary data or with early servlet
implementations built on the Servlet API 1.0.
If you subclass ServletOutputStream, you must
provide an implementation of the write(int)
method.
public abstract class ServletOutputStream extends java.io.OutputStream { // Constructors protected ServletOutputStream(); // Instance Methods public void print(boolean b) throws IOException; public void print(char c) throws IOException; public void print(double d) throws IOException; public void print(float f) throws IOException; public void print(int i) throws IOException; public void print(long l) throws IOException; public void print(String s) throws IOException; public void println() throws IOException; public void println(boolean b) throws IOException; public void println(char c) throws IOException; public void println(double d) throws IOException; public void println(float f) throws IOException; public void println(int i) throws IOException; ...