Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.prolifics.servlet
Class ChunkedOutputStream  view ChunkedOutputStream download ChunkedOutputStream.java

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended bycom.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

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ChunkedOutputStream(java.io.OutputStream out)
           
 
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.io.FilterOutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkedOutputStream

public ChunkedOutputStream(java.io.OutputStream out)
Method Detail

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.