| java.lang.Object java.io.OutputStream java.io.ByteArrayOutputStream org.apache.harmony.rmi.transport.proxy.HttpOutputStream
HttpOutputStream | public class HttpOutputStream extends ByteArrayOutputStream implements ProxyConstants(Code) | | Output stream for HTTP connections.
It sends data only once, wrapped into HTTP response.
author: Mikhail A. Markov, Vasily Zakharov version: $Revision: 1.1.2.4 $ |
Method Summary | |
public synchronized void | close() Wraps all data contained in this stream into HTTP response and writes it
into the underlying output stream. | final public void | writeBytes(String s) Converts the specified string to bytes using
String.getBytes and writes to the stream. |
HttpOutputStream | public HttpOutputStream(OutputStream out, boolean inbound, String host, int port)(Code) | | Constructs this stream by wrapping the specified output stream.
The resulting stream doesn't use CGI.
Parameters: out - Output stream to wrap. Parameters: inbound - If this is inbound connection stream. Parameters: host - Target host name.Used for HTTP headers (for outbound streams)and for diagnostics.Optional (can be null ) for inbound streams. Parameters: port - Target port number.Used for HTTP headers (for outbound streams),and for diagnostics.Is ignored if host is null ). |
HttpOutputStream | public HttpOutputStream(OutputStream out, boolean inbound, String host, int port, boolean cgi)(Code) | | Constructs this stream by wrapping the specified output stream.
Parameters: out - Output stream to wrap. Parameters: inbound - If this is inbound connection stream. Parameters: host - Target host name.Used for HTTP headers for outbound streams,may be used for diagnostics purposes for all streams.Optional (can be null ) for inbound streams. Parameters: port - Target port number.Used for HTTP headers for outbound streams,may be used for diagnostics purposes for all streams.Optional for inbound streams. Parameters: cgi - If this is CGI stream (ignored for inbound streams). |
close | public synchronized void close() throws IOException(Code) | | Wraps all data contained in this stream into HTTP response and writes it
into the underlying output stream. This method can only be called once.
throws: IOException - If I/O error occurs. |
|
|