be.fedict.eid.applet.service.signer
Class CloseActionOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.apache.commons.io.output.ProxyOutputStream
              extended by be.fedict.eid.applet.service.signer.CloseActionOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class CloseActionOutputStream
extends org.apache.commons.io.output.ProxyOutputStream

An output stream proxy implementation that allows us to run something when the stream has been closed. Useful to perform resource cleanup tasks.

Author:
Frank Cornelis

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
CloseActionOutputStream(OutputStream proxy, Runnable closeAction)
           
 
Method Summary
 void close()
           
 
Methods inherited from class org.apache.commons.io.output.ProxyOutputStream
flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseActionOutputStream

public CloseActionOutputStream(OutputStream proxy,
                               Runnable closeAction)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class org.apache.commons.io.output.ProxyOutputStream
Throws:
IOException


Copyright © 2008-2012 FedICT. All Rights Reserved.