1 50 package org.apache.avalon.excalibur.monitor; 51 52 import java.io.IOException ; 53 import java.io.InputStream ; 54 import java.io.OutputStream ; 55 import java.io.Reader ; 56 import java.io.Writer ; 57 58 68 public abstract class StreamResource 69 extends Resource 70 { 71 76 public StreamResource( final String location ) 77 throws Exception 78 { 79 super( location ); 80 } 81 82 85 public abstract InputStream getResourceAsStream() 86 throws IOException ; 87 88 91 public abstract Reader getResourceAsReader() 92 throws IOException ; 93 94 97 public abstract OutputStream setResourceAsStream() 98 throws IOException ; 99 100 103 public abstract Writer setResourceAsWriter() throws IOException ; 104 105 109 protected void streamClosedEvent() 110 { 111 fireAndSetModifiedTime( System.currentTimeMillis() ); 112 } 113 } 114 | Popular Tags |