borland Packages  Class Hierarchy  jb.io Package 

FastBufferedOutputStream class

java.lang.Object
   +----java.io.OutputStream
           +----java.io.FilterOutputStream
                   +----com.borland.jb.io.FastBufferedOutputStream

About the FastBufferedOutputStream class

Variables  Constructors  Properties  Methods  

An unsynchronized buffered output stream that reads out characters from a stream without causing a read every time. The data is read from a buffer, then subsequent reads result in fast buffer access. This class is patterned after java.io.BufferedOutputStream. The primary difference is that all access is unsynchronized (not thread-safe), for faster response.


FastBufferedOutputStream variables

Variables implemented in this class

Variables implemented in java.io.FilterOutputStream

FastBufferedOutputStream constructors

FastBufferedOutputStream properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

FastBufferedOutputStream methods

Methods implemented in this class

Methods implemented in java.io.FilterOutputStream

Methods implemented in java.lang.Object


FastBufferedOutputStream variables

buf

  protected byte[] buf
The buffer where data is stored.

count

  protected int count
The number of bytes in the buffer.

FastBufferedOutputStream constructors

FastBufferedOutputStream(java.io.OutputStream)

  public FastBufferedOutputStream(OutputStream out)
Creates a new buffered stream with a default buffer size of 2048 characters.

Parameters:

out
The output stream.

FastBufferedOutputStream(java.io.OutputStream, int)

  public FastBufferedOutputStream(OutputStream out, int size)
Creates a new buffered stream with the specified buffer size.

Parameters:

out
The output stream.
size
The buffer size.

FastBufferedOutputStream(java.io.OutputStream, int, boolean)

  public FastBufferedOutputStream(OutputStream out, int size, boolean buffer)
Creates a new buffered stream with the specified buffer size.

Parameters:

out
- the output stream
size
- the buffer size
buffer
- buffer writes

FastBufferedOutputStream methods

flush()

  public void flush()
Flushes the stream. This will write any buffered output bytes.

This method throws an IOException if an I/O error occurrs.

Overrides: java.io.FilterOutputStream.flush()

write(byte[], int, int)

  public void write(byte[] b, int off, int len)
Writes a subarray of bytes. This method throws an IOException if an I/O error occurrs.

Parameters:

b
The data to be written.
off
The start offset in the data.
len
The number of bytes that are written.

Overrides: java.io.FilterOutputStream.write(byte[], int, int)

write(int)

  public void write(int b)
Writes a byte. This method will block until the byte is actually written.

This method throws an IOException if an I/O error occurrs.

Parameters:

b
The byte to be written.

Overrides: java.io.FilterOutputStream.write(int)