info.aduna.gee.publication.net
Class WOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by info.aduna.gee.publication.net.WOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class WOutputStream
extends FilterOutputStream

Output stream that can be monitored.


Field Summary
 Vector listeners
          The audience.
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
WOutputStream(OutputStream o, boolean listenerInf)
          Creates an output stream filter that established clean networking behavior.
 
Method Summary
 void close()
          Closes this input stream and releases any system resources associated with the stream.
 void flush()
           
protected  void notifyIOException(IOException e)
          Notify the listeners of an io exception that occurred.
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

public Vector listeners
The audience.

Constructor Detail

WOutputStream

public WOutputStream(OutputStream o,
                     boolean listenerInf)
Creates an output stream filter that established clean networking behavior.

Method Detail

write

public void write(int b)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class FilterOutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

close

public void close()
           throws IOException
Closes this input stream and releases any system resources associated with the stream. The listeners are notified of the action.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Parameters:
listenerInfluence - true to have the listeners decide in whether the close was succesfull or not. This is to support return code from a POST URL request that is initiated on a close from WOutputStream.
Throws:
IOException

notifyIOException

protected void notifyIOException(IOException e)
Notify the listeners of an io exception that occurred.

Parameters:
currentlyIgnored - the IOexception.


Copyright © 1997-2008 Aduna. All Rights Reserved.