|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.servlet Class ServletOutputStream
java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
public abstract class ServletOutputStream
- extends OutputStream
Extends:
java.io.OutputStream
提供用于将二进制数据发送到客户端的输出流。
ServletOutputStream 对象通常是通过 ServletResponse#getOutputStream 方法获取的。
这是 servlet 容器实现的一个抽象类。此类的子类必须实现 java.io.OutputStream.write(int) 方法。
| See also | javax.servlet.ServletResponse |
Provides an output stream for sending binary data to the
client. A ServletOutputStream object is normally retrieved
via the ServletResponse.getOutputStream() method.
This is an abstract class that the servlet container implements.
Subclasses of this class
must implement the java.io.OutputStream.write(int)
method.
- Author:
- Various
- See Also:
ServletResponse
| Constructor Summary | |
|---|---|
protected |
ServletOutputStream()
Does nothing, because this is an abstract class. |
| Method Summary | |
|---|---|
void |
print(boolean b)
Writes a boolean value to the client,
with no carriage return-line feed (CRLF)
character at the end. |
void |
print(char c)
Writes a character to the client, with no carriage return-line feed (CRLF) at the end. |
void |
print(double d)
Writes a double value to the client,
with no carriage return-line feed (CRLF) at the end. |
void |
print(float f)
Writes a float value to the client,
with no carriage return-line feed (CRLF) at the end. |
void |
print(int i)
Writes an int to the client, with no carriage return-line feed (CRLF) at the end. |
void |
print(long l)
Writes a long value to the client,
with no carriage return-line feed (CRLF) at the end. |
void |
print(String s)
Writes a String to the client,
without a carriage return-line feed (CRLF)
character at the end. |
void |
println()
Writes a carriage return-line feed (CRLF) to the client. |
void |
println(boolean b)
Writes a boolean value to the client,
followed by a
carriage return-line feed (CRLF). |
void |
println(char c)
Writes a character to the client, followed by a carriage return-line feed (CRLF). |
void |
println(double d)
Writes a double value to the client,
followed by a carriage return-line feed (CRLF). |
void |
println(float f)
Writes a float value to the client,
followed by a carriage return-line feed (CRLF). |
void |
println(int i)
Writes an int to the client, followed by a carriage return-line feed (CRLF) character. |
void |
println(long l)
Writes a long value to the client, followed by a
carriage return-line feed (CRLF). |
void |
println(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 |
| Constructor Detail |
|---|
protected
ServletOutputStream()
不执行任何操作,因为这是一个抽象类。
英文文档:
ServletOutputStream
protected ServletOutputStream()
- Does nothing, because this is an abstract class.
| Method Detail |
|---|
public void
print(String s) throws java.io.IOException
将 String 写入客户端,末尾没有回车-换行 (CRLF) 字符。
| s |
将发送到客户端的 String |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(String s) throws IOException
- Writes a
Stringto the client, without a carriage return-line feed (CRLF) character at the end. - Parameters:
s- theStringto send to the client- Throws:
IOException- if an input or output exception occurred
public void
print(boolean b) throws java.io.IOException
将 boolean 值写入客户端,末尾没有回车-换行 (CRLF) 字符。
| b |
将发送到客户端的 boolean 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(boolean b)
throws IOException
- Writes a
booleanvalue to the client, with no carriage return-line feed (CRLF) character at the end. - Parameters:
b- thebooleanvalue to send to the client- Throws:
IOException- if an input or output exception occurred
public void
print(char c) throws java.io.IOException
将字符写入客户端,末尾没有回车-换行 (CRLF)。
| c | 将发送到客户端的字符 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(char c)
throws IOException
- Writes a character to the client,
with no carriage return-line feed (CRLF)
at the end.
- Parameters:
c- the character to send to the client- Throws:
IOException- if an input or output exception occurred
public void
print(int i) throws java.io.IOException
将 int 值写入客户端,末尾没有回车-换行 (CRLF)。
| i | 将发送到客户端的 int 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(int i)
throws IOException
- Writes an int to the client,
with no carriage return-line feed (CRLF)
at the end.
- Parameters:
i- the int to send to the client- Throws:
IOException- if an input or output exception occurred
public void
print(long l) throws java.io.IOException
将 long 值写入客户端,末尾没有回车-换行 (CRLF)。
| l |
将发送到客户端的 long 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(long l)
throws IOException
- Writes a
longvalue to the client, with no carriage return-line feed (CRLF) at the end. - Parameters:
l- thelongvalue to send to the client- Throws:
IOException- if an input or output exception occurred
public void
print(float f) throws java.io.IOException
将 float 值写入客户端,末尾没有回车-换行 (CRLF)。
| f |
将发送到客户端的 float 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(float f)
throws IOException
- Writes a
floatvalue to the client, with no carriage return-line feed (CRLF) at the end. - Parameters:
f- thefloatvalue to send to the client- Throws:
IOException- if an input or output exception occurred
public void
print(double d) throws java.io.IOException
将 double 值写入客户端,末尾没有回车-换行 (CRLF)。
| d |
将发送到客户端的 double 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
public void print(double d)
throws IOException
- Writes a
doublevalue to the client, with no carriage return-line feed (CRLF) at the end. - Parameters:
d- thedoublevalue to send to the client- Throws:
IOException- if an input or output exception occurred
public void
println() throws java.io.IOException
将回车-换行 (CRLF) 写入客户端。
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println()
throws IOException
- Writes a carriage return-line feed (CRLF)
to the client.
- Throws:
IOException- if an input or output exception occurred
public void
println(String s) throws java.io.IOException
将 String 写入客户端,后跟一个回车-换行 (CRLF)。
| s |
要写入客户端的 String |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(String s) throws IOException
- Writes a
Stringto the client, followed by a carriage return-line feed (CRLF). - Parameters:
s- theStringto write to the client- Throws:
IOException- if an input or output exception occurred
public void
println(boolean b) throws java.io.IOException
将 boolean 值写入客户端,后跟一个回车-换行 (CRLF)。
| b |
要写入客户端的 boolean 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(boolean b)
throws IOException
- Writes a
booleanvalue to the client, followed by a carriage return-line feed (CRLF). - Parameters:
b- thebooleanvalue to write to the client- Throws:
IOException- if an input or output exception occurred
public void
println(char c) throws java.io.IOException
将字符写入客户端,后跟一个回车-换行 (CRLF)。
| c | 要写入客户端的字符 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(char c)
throws IOException
- Writes a character to the client, followed by a carriage
return-line feed (CRLF).
- Parameters:
c- the character to write to the client- Throws:
IOException- if an input or output exception occurred
public void
println(int i) throws java.io.IOException
将 int 值写入客户端,后跟一个回车-换行 (CRLF) 字符。
| i | 要写入客户端的 int 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(int i)
throws IOException
- Writes an int to the client, followed by a
carriage return-line feed (CRLF) character.
- Parameters:
i- the int to write to the client- Throws:
IOException- if an input or output exception occurred
public void
println(long l) throws java.io.IOException
将 long 值写入客户端,后跟一个回车-换行 (CRLF)。
| l |
要写入客户端的 long 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(long l)
throws IOException
- Writes a
longvalue to the client, followed by a carriage return-line feed (CRLF). - Parameters:
l- thelongvalue to write to the client- Throws:
IOException- if an input or output exception occurred
public void
println(float f) throws java.io.IOException
将 float 值写入客户端,后跟一个回车-换行 (CRLF)。
| f |
要写入客户端的 float 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(float f)
throws IOException
- Writes a
floatvalue to the client, followed by a carriage return-line feed (CRLF). - Parameters:
f- thefloatvalue to write to the client- Throws:
IOException- if an input or output exception occurred
public void
println(double d) throws java.io.IOException
将 double 值写入客户端,后跟一个回车-换行 (CRLF)。
| d |
要写入客户端的 double 值 |
| Throws | java.io.IOException: 如果发生输入或输出异常 |
println
public void println(double d)
throws IOException
- Writes a
doublevalue to the client, followed by a carriage return-line feed (CRLF). - Parameters:
d- thedoublevalue to write to the client- Throws:
IOException- if an input or output exception occurred
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!
