Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.util
Class MultiOutputStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--com.compoze.util.MultiOutputStream

All Implemented Interfaces:
  java.io.Serializable

public class MultiOutputStream
extends java.io.OutputStream
implements java.io.Serializable

This class writes output to this OutputStream synchronously to any number of underlying OutputStreams.

See Also:
  Serialized Form

Constructor Summary
`MultiOutputStream()` Constructor.
`MultiOutputStream(java.util.Collection outputStreams)` Constructor.
`MultiOutputStream(java.io.OutputStream[] outputStreams)` Constructor.

Method Summary
`void` | `addOutputStream(java.io.OutputStream os)` Add an output stream to the list output streams that are written to.
`void` | `close()` Close all underlying output streams.
`void` | `flush()` Flush all underlying output streams.
`void` | `removeOutputStream(java.io.OutputStream os)` Remove an output stream from the list of output streams that are written to.
`void` | `write(byte[] bytes)` Write to all underlying output streams.
`void` | `write(byte[] bytes, int iOffset, int iLength)` Write to all underlying output streams.
`void` | `write(int i)` Write to all underlying output streams.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiOutputStream

    public MultiOutputStream()

  Constructor.

### MultiOutputStream

    public MultiOutputStream(java.io.OutputStream[] outputStreams)

  Constructor.
  Parameters:
    `outputStreams` - an array of output stream to write to

### MultiOutputStream

    public MultiOutputStream(java.util.Collection outputStreams)

  Constructor.
  Parameters:
    `outputStreams` - a collection of output stream to write to

Method Detail

### addOutputStream

    public void addOutputStream(java.io.OutputStream os)

  Add an output stream to the list output streams that are written to.
  Parameters:
    `os` - the output stream to add

### removeOutputStream

    public void removeOutputStream(java.io.OutputStream os)

  Remove an output stream from the list of output streams that are written to.
  Parameters:
    `os` - the output stream to add

### close

    public void close()
               throws java.io.IOException

  Close all underlying output streams.
  Overrides:
    `close` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException` - if an i/o error occurs

### flush

    public void flush()
               throws java.io.IOException

  Flush all underlying output streams.
  Overrides:
    `flush` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException` - if an i/o error occurs

### write

    public void write(int i)
               throws java.io.IOException

  Write to all underlying output streams.
  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `i` - the byte to write

### write

    public void write(byte[] bytes)
               throws java.io.IOException

  Write to all underlying output streams.
  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `bytes` - the byte array to write

### write

    public void write(byte[] bytes,
                      int iOffset,
                      int iLength)
               throws java.io.IOException

  Write to all underlying output streams.
  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `bytes` - to byte array to write
    `iOffset` - offset in array
    `iLength` - number of bytes to write

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.