edu.udo.cs.yale.tools
Class WriterMultiplier

java.lang.Object
  extended by java.io.Writer
      extended by edu.udo.cs.yale.tools.WriterMultiplier
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class WriterMultiplier
extends java.io.Writer

By using this multiplier all written content is multiplied to the given writers.

Version:
$Id: WriterMultiplier.java,v 2.9 2006/08/03 14:39:31 ingomierswa Exp $
Author:
Simon Fischer, Ingo Mierswa

Field Summary
private  java.io.Writer[] writer
          The writers to write the contents to.
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
WriterMultiplier(java.io.Writer[] writer)
          Creates a new writer multiplier.
 
Method Summary
 void close()
          Closes all writers.
 void flush()
          Flushes all writers.
 void write(char[] bytes, int offset, int length)
          Implements the abstract method of the superclass.
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

private java.io.Writer[] writer
The writers to write the contents to.

Constructor Detail

WriterMultiplier

public WriterMultiplier(java.io.Writer[] writer)
Creates a new writer multiplier.

Method Detail

write

public void write(char[] bytes,
                  int offset,
                  int length)
           throws java.io.IOException
Implements the abstract method of the superclass.

Specified by:
write in class java.io.Writer
Throws:
java.io.IOException


close

public void close()
           throws java.io.IOException
Closes all writers.

Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
Throws:
java.io.IOException


flush

public void flush()
           throws java.io.IOException
Flushes all writers.

Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException



Copyright © 2001-2006