java.io
Class OutputStream

java.lang.Object
  |
  +--java.io.OutputStream
Direct Known Subclasses:
FileOutputStream, FilterOutputStream

public abstract class OutputStream
extends Object


Constructor Summary
OutputStream()
          Default constructor.
 
Method Summary
 void close()
          Closes this output stream and releases all system resources associated with it.
 void flush()
          Flushes this output stream.
 void write(byte[] b)
          Writes b.length bytes from b to this output stream.
 void write(byte[] b, int off, int len)
          Writes len bytes from b to this output stream starting at offset off.
abstract  void write(int b)
          Writes a single byte to this output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, toString
 

Constructor Detail

OutputStream

public OutputStream()
Default constructor.

Method Detail

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from b to this output stream starting at offset off.

Parameters:
b - Array of bytes containing the data to be written.
off - Offset into b where the data begins.
len - Number of bytes to be written.
Throws:
IOException - if an I/O error occures.

close

public void close()
           throws IOException
Closes this output stream and releases all system resources associated with it.

IOException

flush

public void flush()
           throws IOException
Flushes this output stream.

IOException

write

public abstract void write(int b)
                    throws IOException
Writes a single byte to this output stream. This method is abstract in this class, and must be overwritten by subclasses.

Throws:
IOException - if an I/O error occures.

write

public void write(byte[] b)
           throws IOException
Writes b.length bytes from b to this output stream.

Parameters:
b - Array of bytes containing the data to be written.
Throws:
IOException - if an I/O error occures.