Java Servlet Programming, 2nd Edition > A. Servlet API Quick Reference > ServletOutputStream |
SynopsisClass Name: javax.servlet.ServletOutputStream Superclass: java.io.OutputStream Immediate Subclasses: None Interfaces Implemented: None Availability: Servlet API 1.0 and later DescriptionProvides 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. If you subclass ServletOutputStream, you must provide an implementation of the write(int) method. Class Summarypublic 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; public void println(long l) throws IOException; public void println(String s) throws IOException; } ConstructorsServletOutputStream()protected ServletOutputStream()
Instance Methodsprint()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
println()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 public void println(long l) throws IOException public void println(String s) throws IOException
|