java.lang.Object | +--java.io.OutputStream | +--javax.servlet.ServletOutputStream
Provides an output stream for sending binary data to the client. AServletOutputStream
object is normally retrieved via theServletResponse.getOutputStream()
method.
This is an abstract class that the servlet container implements. Subclasses of this class must implement thejava.io.OutputStream.write(int)
method.
ServletResponse
ServletOutputStream() Does nothing, because this is an abstract class. |
print(boolean b) Writes a boolean value to the client, with no carriage return-line feed (CRLF) character at the end. | |
print(char c) Writes a character to the client, with no carriage return-line feed (CRLF) at the end. | |
print(double d) Writes a double value to the client, with no carriage return-line feed (CRLF) at the end. | |
print(float f) Writes a float value to the client, with no carriage return-line feed (CRLF) at the end. | |
print(int i) Writes an int to the client, with no carriage return-line feed (CRLF) at the end. | |
print(long l) Writes a long value to the client, with no carriage return-line feed (CRLF) at the end. | |
print(java.lang.String s) Writes a String to the client, without a carriage return-line feed (CRLF) character at the end. | |
println() Writes a carriage return-line feed (CRLF) to the client. | |
println(boolean b) Writes a boolean value to the client, followed by a carriage return-line feed (CRLF). | |
println(char c) Writes a character to the client, followed by a carriage return-line feed (CRLF). | |
println(double d) Writes a double value to the client, followed by a carriage return-line feed (CRLF). | |
println(float f) Writes a float value to the client, followed by a carriage return-line feed (CRLF). | |
println(int i) Writes an int to the client, followed by a carriage return-line feed (CRLF) character. | |
println(long l) Writes a long value to the client, followed by a carriage return-line feed (CRLF). | |
println(java.lang.String s) Writes a String to the client, followed by a carriage return-line feed (CRLF). |
Methods inherited from class java.io.OutputStream |
close, flush, write, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
protectedServletOutputStream()
public voidprint(java.lang.String s) throws java.io.IOException
String
to the client, without a carriage return-line feed (CRLF) character at the end.s
- theString
Throws:java.io.IOException
- if an input or output exception occurredpublic voidprint(boolean b) throws java.io.IOException
boolean
value to the client, with no carriage return-line feed (CRLF) character at the end.b
- theboolean
value to send to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprint(char c) throws java.io.IOException
c
- the character to send to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprint(int i) throws java.io.IOException
i
- the int to send to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprint(long l) throws java.io.IOException
long
value to the client, with no carriage return-line feed (CRLF) at the end.l
- thelong
value to send to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprint(float f) throws java.io.IOException
float
value to the client, with no carriage return-line feed (CRLF) at the end.f
- thefloat
valueto send to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprint(double d) throws java.io.IOException
double
value to the client, with no carriage return-line feed (CRLF) at the end.d
- thedouble
valueto send to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln() throws java.io.IOException
java.io.IOException
- if an input or output exception occurredpublic voidprintln(java.lang.String s) throws java.io.IOException
String
to the client, followed by a carriage return-line feed (CRLF).s
- theString to write to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln(boolean b) throws java.io.IOException
boolean
value to the client, followed by a carriage return-line feed (CRLF).b
- theboolean
value to write to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln(char c) throws java.io.IOException
c
- the character to write to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln(int i) throws java.io.IOException
i
- the int to write to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln(long l) throws java.io.IOException
long
value to the client, followed by a carriage return-line feed (CRLF).l
- thelong
value to write to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln(float f) throws java.io.IOException
float
value to the client, followed by a carriage return-line feed (CRLF).f
- thefloat
value to write to the clientjava.io.IOException
- if an input or output exception occurredpublic voidprintln(double d) throws java.io.IOException
double
value to the client, followed by a carriage return-line feed (CRLF).d
- thedouble
valueto write to the clientjava.io.IOException
- if an input or output exception occurred