org.apache.avalon.excalibur.monitor
Class ResourceOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.apache.avalon.excalibur.monitor.ResourceOutputStream
All Implemented Interfaces:
Closeable, Flushable

public final class ResourceOutputStream
extends FilterOutputStream

Managed Stream. This is convenient when you want to dynamically set and get the information from the resource. For instance, the Resource does not need to be actively monitored if all access to the resource goes through this type of Resource. It can notify the change as soon as the Writer or OutputStream has been closed.

Version:
$Id: ResourceOutputStream.java,v 1.4 2004/02/28 11:47:32 cziegeler Exp $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ResourceOutputStream(OutputStream out, StreamResource resource)
          Set up the ResourceOutputStream.
 
Method Summary
 void close()
          Override the close method so that we can be notified when the update is complete.
 
Methods inherited from class java.io.FilterOutputStream
flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceOutputStream

public ResourceOutputStream(OutputStream out,
                            StreamResource resource)
Set up the ResourceOutputStream.

Method Detail

close

public final void close()
                 throws IOException
Override the close method so that we can be notified when the update is complete.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException


Copyright © 1997-2012 The Apache Software Foundation. All Rights Reserved.