org.apache.avalon.excalibur.monitor
Class SourceResource

java.lang.Object
  |
  +--org.apache.avalon.excalibur.monitor.Resource
        |
        +--org.apache.avalon.excalibur.monitor.StreamResource
              |
              +--org.apache.avalon.excalibur.monitor.SourceResource
All Implemented Interfaces:
Modifiable

public final class SourceResource
extends StreamResource

Version:
$Id: SourceResource.java,v 1.14 2003/03/22 12:46:50 leosimons Exp $
Author:
Carsten Ziegeler

Field Summary
 
Fields inherited from class org.apache.avalon.excalibur.monitor.Resource
m_eventSupport, m_previousModified, MODIFIED
 
Constructor Summary
SourceResource(Source source)
          Instantiate the SourceResource
 
Method Summary
 Reader getResourceAsReader()
          Sets the resource value with a Writer
 InputStream getResourceAsStream()
          Sets the resource value with an OutputStream
 Source getSource()
           
 long lastModified()
          Determines the last time this resource was modified
 OutputStream setResourceAsStream()
          Sets the resource value with an OutputStream
 Writer setResourceAsWriter()
          Sets the resource value with a Writer
 
Methods inherited from class org.apache.avalon.excalibur.monitor.StreamResource
streamClosedEvent
 
Methods inherited from class org.apache.avalon.excalibur.monitor.Resource
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenersFrom, fireAndSetModifiedTime, getEventSupport, getPreviousModified, getResourceKey, hasListeners, hasListeners, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setPreviousModified, testModifiedAfter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SourceResource

public SourceResource(Source source)
               throws Exception
Instantiate the SourceResource

Method Detail

lastModified

public long lastModified()
Determines the last time this resource was modified

Specified by:
lastModified in interface Modifiable
Specified by:
lastModified in class Resource

getResourceAsStream

public InputStream getResourceAsStream()
                                throws IOException
Sets the resource value with an OutputStream

Specified by:
getResourceAsStream in class StreamResource
IOException

getResourceAsReader

public Reader getResourceAsReader()
                           throws IOException
Sets the resource value with a Writer

Specified by:
getResourceAsReader in class StreamResource
IOException

setResourceAsStream

public OutputStream setResourceAsStream()
                                 throws IOException
Sets the resource value with an OutputStream

Specified by:
setResourceAsStream in class StreamResource
IOException

setResourceAsWriter

public Writer setResourceAsWriter()
                           throws IOException
Sets the resource value with a Writer

Specified by:
setResourceAsWriter in class StreamResource
IOException

getSource

public Source getSource()


Copyright © 2000-2003 Apache Avalon Project. All Rights Reserved.