java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.prolifics.servlet.ChunkedOutputStream
- class ChunkedOutputStream
- extends java.io.FilterOutputStream
The class implements a buffered output stream. By setting up such
an output stream, an application can write bytes to the underlying
output stream without necessarily causing a call to the underlying
system for each byte written. The data is written into a buffer,
and then written to the underlying stream if the buffer reaches
its capacity, the buffer output stream is closed, or the buffer
output stream is explicity flushed.
- Since:
- JDK1.0
- Version:
- @(#)ChunkedOutputStream.java 77.1 99/04/22 15:03:03
|
Method Summary |
void |
close()
This method closes the underlying OutputStream. |
static void |
main(java.lang.String[] args)
|
void |
write(byte[] buf)
This method writes all the bytes in the specified array to the underlying
OutputStream. |
void |
write(byte[] buf,
int off,
int count)
This method calls the write(int) method len
times for all bytes from the array buf starting at index
offset. |
void |
write(int val)
This method writes a single byte of output to the underlying
OutputStream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkedOutputStream
public ChunkedOutputStream(java.io.OutputStream out)
main
public static void main(java.lang.String[] args)
throws java.io.FileNotFoundException,
java.io.IOException
write
public void write(int val)
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method writes a single byte of output to the underlying
OutputStream.
write
public void write(byte[] buf)
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method writes all the bytes in the specified array to the underlying
OutputStream. It does this by calling the three parameter
version of this method - write(byte[], int, int) in this
class instead of writing to the underlying OutputStream
directly. This allows most subclasses to avoid overriding this method.
write
public void write(byte[] buf,
int off,
int count)
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method calls the
write(int) method len
times for all bytes from the array buf starting at index
offset. Subclasses should overwrite this method to get a
more efficient implementation.
close
public void close()
throws java.io.IOException
- Description copied from class:
java.io.FilterOutputStream
- This method closes the underlying
OutputStream. Any
further attempts to write to this stream may throw an exception.