org.apache.avalon.excalibur.monitor
Class SourceResource

java.lang.Object
  extended by org.apache.avalon.excalibur.monitor.Resource
      extended by org.apache.avalon.excalibur.monitor.StreamResource
          extended by org.apache.avalon.excalibur.monitor.SourceResource
All Implemented Interfaces:
Modifiable

public final class SourceResource
extends StreamResource

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

Field Summary
private  org.apache.excalibur.source.Source m_source
          The wrapped source object
private  org.apache.excalibur.source.SourceValidity m_validity
          The last validity object
 
Fields inherited from class org.apache.avalon.excalibur.monitor.Resource
m_eventSupport, m_previousModified, MODIFIED
 
Constructor Summary
SourceResource(org.apache.excalibur.source.Source source)
          Instantiate the SourceResource
 
Method Summary
 java.io.Reader getResourceAsReader()
          Sets the resource value with a Writer
 java.io.InputStream getResourceAsStream()
          Sets the resource value with an OutputStream
 org.apache.excalibur.source.Source getSource()
           
 long lastModified()
          Determines the last time this resource was modified
 java.io.OutputStream setResourceAsStream()
          Sets the resource value with an OutputStream
 java.io.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
 

Field Detail

m_source

private final org.apache.excalibur.source.Source m_source
The wrapped source object


m_validity

private org.apache.excalibur.source.SourceValidity m_validity
The last validity object

Constructor Detail

SourceResource

public SourceResource(org.apache.excalibur.source.Source source)
               throws java.lang.Exception
Instantiate the SourceResource

Throws:
java.lang.Exception
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 java.io.InputStream getResourceAsStream()
                                        throws java.io.IOException
Sets the resource value with an OutputStream

Specified by:
getResourceAsStream in class StreamResource
Throws:
java.io.IOException

getResourceAsReader

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

Specified by:
getResourceAsReader in class StreamResource
Throws:
java.io.IOException

setResourceAsStream

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

Specified by:
setResourceAsStream in class StreamResource
Throws:
java.io.IOException

setResourceAsWriter

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

Specified by:
setResourceAsWriter in class StreamResource
Throws:
java.io.IOException

getSource

public org.apache.excalibur.source.Source getSource()