1 22 package org.jboss.virtual.plugins.context; 23 24 import java.io.IOException ; 25 import java.io.InputStream ; 26 import java.io.Serializable ; 27 import java.net.URI ; 28 29 import org.jboss.virtual.spi.VFSContext; 30 import org.jboss.virtual.spi.VirtualFileHandler; 31 32 38 public abstract class AbstractURIHandler extends AbstractVirtualFileHandler 39 implements Serializable 40 { 41 private static final long serialVersionUID = 1L; 42 43 44 private final URI uri; 45 46 55 public AbstractURIHandler(VFSContext context, VirtualFileHandler parent, URI uri, String name) 56 { 57 super(context, parent, name); 58 if (uri == null) 59 throw new IllegalArgumentException ("Null uri"); 60 this.uri = uri; 61 } 62 63 68 public URI getURI() 69 { 70 return uri; 71 } 72 73 public long getLastModified() throws IOException 74 { 75 checkClosed(); 76 return 0; 77 } 78 79 public long getSize() throws IOException 80 { 81 checkClosed(); 82 return 0; 83 } 84 85 public boolean isHidden() throws IOException 86 { 87 checkClosed(); 88 return false; 89 } 90 91 public InputStream openStream() throws IOException 92 { 93 checkClosed(); 94 return null; 95 } 96 97 public URI toURI() 98 { 99 return uri; 100 } 101 } 102 | Popular Tags |