org.apache.avalon.excalibur.monitor
クラス StreamResource

java.lang.Object
  |
  +--org.apache.avalon.excalibur.monitor.Resource
        |
        +--org.apache.avalon.excalibur.monitor.StreamResource
すべての実装インタフェース:
Modifiable
直系の既知のサブクラス:
FileResource

public abstract class StreamResource
extends Resource

Managed Stream based Resource. 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.

バージョン:
$Id: StreamResource.java,v 1.2 2001/12/11 09:53:30 jefft Exp $
作成者:
Berin Loritsch

クラス org.apache.avalon.excalibur.monitor.Resource から継承したフィールド
m_eventSupport, m_previousModified, MODIFIED
 
コンストラクタの概要
StreamResource(java.lang.String location)
          Required constructor.
 
メソッドの概要
abstract  java.io.Reader getResourceAsReader()
          Get the Resource contents as a Reader.
abstract  java.io.InputStream getResourceAsStream()
          Get the Resource contents as an InputStream.
abstract  java.io.OutputStream setResourceAsStream()
          Set the Resource contents as an OutputStream.
abstract  java.io.Writer setResourceAsWriter()
          Set the Resource contents as a Writer.
protected  void streamClosedEvent()
          Automatically handle the streamClosedEvent from the ResourceOutputStream and ResourceWriter.
 
クラス org.apache.avalon.excalibur.monitor.Resource から継承したメソッド
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenersFrom, getResourceKey, hasListeners, hasListeners, lastModified, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, testModifiedAfter
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

StreamResource

public StreamResource(java.lang.String location)
               throws java.lang.Exception
Required constructor. The String location is transformed by the specific resource monitor. For instance, a FileResource will be able to convert a string representation of a path to the proper File object.
メソッドの詳細

getResourceAsStream

public abstract java.io.InputStream getResourceAsStream()
                                                 throws java.io.IOException
Get the Resource contents as an InputStream.

getResourceAsReader

public abstract java.io.Reader getResourceAsReader()
                                            throws java.io.IOException
Get the Resource contents as a Reader.

setResourceAsStream

public abstract java.io.OutputStream setResourceAsStream()
                                                  throws java.io.IOException
Set the Resource contents as an OutputStream.

setResourceAsWriter

public abstract java.io.Writer setResourceAsWriter()
                                            throws java.io.IOException
Set the Resource contents as a Writer.

streamClosedEvent

protected void streamClosedEvent()
Automatically handle the streamClosedEvent from the ResourceOutputStream and ResourceWriter.


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."