ServletOutputStream (Java EE 5)

Java EE API


javax.servlet Class ServletOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
All Implemented Interfaces:
Closeable, Flushable

public abstract class ServletOutputStream
extends OutputStream

Extends: java.io.OutputStream

提供用于将二进制数据发送到客户端的输出流。ServletOutputStream 对象通常是通过 ServletResponse#getOutputStream 方法获取的。

这是 servlet 容器实现的一个抽象类。此类的子类必须实现 java.io.OutputStream.write(int) 方法。

英文文档:

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
 
Method Summary
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 
Methods inherited from class java.io.OutputStream
 
Methods inherited from class java.lang.Object
 

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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

public void print(String s)
           throws IOException
Writes a String to the client, without a carriage return-line feed (CRLF) character at the end.

Parameters:
s - the String to 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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

public void print(boolean b)
           throws IOException
Writes a boolean value to the client, with no carriage return-line feed (CRLF) character at the end.

Parameters:
b - the boolean value 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 将发送到客户端的字符
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

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 值
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

public void print(long l)
           throws IOException
Writes a long value to the client, with no carriage return-line feed (CRLF) at the end.

Parameters:
l - the long value 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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

public void print(float f)
           throws IOException
Writes a float value to the client, with no carriage return-line feed (CRLF) at the end.

Parameters:
f - the float value 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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

print

public void print(double d)
           throws IOException
Writes a double value to the client, with no carriage return-line feed (CRLF) at the end.

Parameters:
d - the double value to send to the client
Throws:
IOException - if an input or output exception occurred

public void println() throws java.io.IOException
将回车-换行 (CRLF) 写入客户端。
Throwsjava.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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

println

public void println(String s)
             throws IOException
Writes a String to the client, followed by a carriage return-line feed (CRLF).

Parameters:
s - the String to 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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

println

public void println(boolean b)
             throws IOException
Writes a boolean value to the client, followed by a carriage return-line feed (CRLF).

Parameters:
b - the boolean value 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 要写入客户端的字符
Throwsjava.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 值
Throwsjava.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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

println

public void println(long l)
             throws IOException
Writes a long value to the client, followed by a carriage return-line feed (CRLF).

Parameters:
l - the long value 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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

println

public void println(float f)
             throws IOException
Writes a float value to the client, followed by a carriage return-line feed (CRLF).

Parameters:
f - the float value 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
Throwsjava.io.IOException: 如果发生输入或输出异常
英文文档:

println

public void println(double d)
             throws IOException
Writes a double value to the client, followed by a carriage return-line feed (CRLF).

Parameters:
d - the double value to write to the client
Throws:
IOException - if an input or output exception occurred


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!