public class PosterOutputStream
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.
Fields inherited from class java.io.ByteArrayOutputStream
Writes len bytes from the specified byte array
starting at offset off to this output stream.
write in class java.io.ByteArrayOutputStream
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
public void reset()
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.
reset in class java.io.ByteArrayOutputStream
public void close()
After close() has been called, it is no longer possible to write
to this stream. Further calls to write will have no effect.