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 java.io.OutputStream

OutputStream wrapper supporting the chunked transfer encoding.

Version:
$Revision: 1.21 $ $Date: 2003/04/04 02:37:02 $
Author:
Remy Maucherat, Sean C. Sullivan, dIon Gillard, Mike Bowler

Constructor Summary
RequestOutputStream(java.io.OutputStream stream)
          Deprecated. Use ChunkedOutputStream;
RequestOutputStream(java.io.OutputStream stream, boolean useChunking)
          Deprecated. Use ChunkedOutputStream;
 
Method Summary
 void close()
          Deprecated. Use ChunkedOutputStream;
 boolean isUseChunking()
          Deprecated. Use ChunkedOutputStream;
 void print(java.lang.String s)
          Deprecated. Use ChunkedOutputStream;
 void println()
          Deprecated. Use ChunkedOutputStream;
 void println(java.lang.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(java.io.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(java.io.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(java.lang.String s)
           throws java.io.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:
java.io.IOException - if an input or output exception occurred

println

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

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

println

public void println(java.lang.String s)
             throws java.io.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:
java.io.IOException - if an input or output exception occurred

write

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

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

write

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

Write the specified byte array.
Overrides:
write in class java.io.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:
java.io.IOException - when errors occur writing output

close

public void close()
           throws java.io.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 java.io.OutputStream
Throws:
java.io.IOException - if an error occurs closing the stream


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