org.apache.commons.httpclient
Class RequestOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--org.apache.commons.httpclient.RequestOutputStream

Deprecated. Use new ChunkedOutputStream(HttpConnecion#getRequestOutputStream());

public class RequestOutputStream
extends OutputStream

OutputStream wrapper supporting the chunked transfer encoding.

Version:
$Revision: 1.21.2.1 $ $Date: 2004/02/22 18:21:13 $
Author:
Remy Maucherat, Sean C. Sullivan, dIon Gillard, Mike Bowler

Constructor Summary
RequestOutputStream(OutputStream stream)
          Deprecated. Use ChunkedOutputStream;
RequestOutputStream(OutputStream stream, boolean useChunking)
          Deprecated. Use ChunkedOutputStream;
 
Method Summary
 void close()
          Deprecated. Use ChunkedOutputStream;
 boolean isUseChunking()
          Deprecated. Use ChunkedOutputStream;
 void print(String s)
          Deprecated. Use ChunkedOutputStream;
 void println()
          Deprecated. Use ChunkedOutputStream;
 void println(String s)
          Deprecated. Use ChunkedOutputStream;
 void setUseChunking(boolean useChunking)
          Deprecated. Use ChunkedOutputStream;
 void write(byte[] b, int off, int len)
          Deprecated. Use ChunkedOutputStream;
 void write(int b)
          Deprecated. Use ChunkedOutputStream;
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestOutputStream

public RequestOutputStream(OutputStream stream)
Deprecated. Use ChunkedOutputStream;

Construct an output stream wrapping the given stream. The stream will not use chunking.
Parameters:
stream - wrapped output stream. Must be non-null.

RequestOutputStream

public RequestOutputStream(OutputStream stream,
                           boolean useChunking)
Deprecated. Use ChunkedOutputStream;

Construct an output stream wrapping the given stream.
Parameters:
stream - wrapped output stream. Must be non-null.
useChunking - when true, the chunked transfer encoding will be used
Method Detail

setUseChunking

public void setUseChunking(boolean useChunking)
Deprecated. Use ChunkedOutputStream;

Use chunking flag setter.
Parameters:
useChunking - true if chunking is to be used, false otherwise

isUseChunking

public boolean isUseChunking()
Deprecated. Use ChunkedOutputStream;

Use chunking flag getter.
Returns:
true if chunking is to be used, false otherwise

print

public void print(String s)
           throws IOException
Deprecated. Use ChunkedOutputStream;

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. Must be non-null.
Throws:
IOException - if an input or output exception occurred

println

public void println()
             throws IOException
Deprecated. Use ChunkedOutputStream;

Writes a carriage return-line feed (CRLF) to the client.
Throws:
IOException - if an input or output exception occurred

println

public void println(String s)
             throws IOException
Deprecated. Use ChunkedOutputStream;

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

write

public void write(int b)
           throws IOException
Deprecated. Use ChunkedOutputStream;

Write the specified byte to our output stream.
Overrides:
write in class OutputStream
Parameters:
b - The byte to be written
Throws:
IOException - if an input/output error occurs

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Deprecated. Use ChunkedOutputStream;

Write the specified byte array.
Overrides:
write in class OutputStream
Parameters:
b - the byte array to write out
off - the offset within b to start writing from
len - the length of data within b to write
Throws:
IOException - when errors occur writing output

close

public void close()
           throws IOException
Deprecated. Use ChunkedOutputStream;

Close this output stream, causing any buffered data to be flushed and any further output data to throw an IOException.
Overrides:
close in class OutputStream
Throws:
IOException - if an error occurs closing the stream


Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.