| java.lang.Object java.io.OutputStream java.io.ByteArrayOutputStream sun.net.www.http.PosterOutputStream
PosterOutputStream | public class PosterOutputStream extends ByteArrayOutputStream (Code) | | Instances of this class are returned to applications for the purpose of
sending user data for a HTTP POST or PUT request. This class is used
when the content-length will be specified in the header of the request.
The semantics of ByteArrayOutputStream are extended so that
when close() is called, it is no longer possible to write
additional data to the stream. From this point the content length of
the request is fixed and cannot change.
version: 1.1, 07/26/01 author: Michael McMahon |
Method Summary | |
public synchronized void | close() After close() has been called, it is no longer possible to write
to this stream. | public synchronized void | reset() Resets the count field of this output
stream to zero, so that all currently accumulated output in the
ouput stream is discarded. | public synchronized void | write(int b) Writes the specified byte to this output stream. | public synchronized void | write(byte b, int off, int len) Writes len bytes from the specified byte array
starting at offset off to this output stream. |
PosterOutputStream | public PosterOutputStream()(Code) | | Creates a new output stream for POST user data
|
close | public synchronized void close() throws IOException(Code) | | After close() has been called, it is no longer possible to write
to this stream. Further calls to write will have no effect.
|
reset | public synchronized void reset()(Code) | | Resets the count field of this output
stream to zero, so that all currently accumulated output in the
ouput stream is discarded. The output stream can be used again,
reusing the already allocated buffer space. If the output stream
has been closed, then this method has no effect.
See Also: java.io.ByteArrayInputStream.count |
write | public synchronized void write(int b)(Code) | | Writes the specified byte to this output stream.
Parameters: b - the byte to be written. |
write | public synchronized void write(byte b, int off, int len)(Code) | | Writes len bytes from the specified byte array
starting at offset off to this output stream.
Parameters: b - the data. Parameters: off - the start offset in the data. Parameters: len - the number of bytes to write. |
|
|