1 22 23 package org.jboss.virtual.plugins.context; 24 25 import java.io.IOException ; 26 import java.io.InputStream ; 27 import java.net.MalformedURLException ; 28 import java.net.URI ; 29 import java.net.URISyntaxException ; 30 import java.net.URL ; 31 import java.util.List ; 32 33 import org.jboss.virtual.spi.VFSContext; 34 import org.jboss.virtual.spi.VirtualFileHandler; 35 36 44 public class DelegatingHandler extends AbstractVirtualFileHandler 45 { 46 47 private static final long serialVersionUID = 1; 48 49 50 private VirtualFileHandler delegate; 51 52 60 public DelegatingHandler(VFSContext context, VirtualFileHandler parent, String name, 61 VirtualFileHandler delegate) 62 { 63 super(context, parent, name); 64 this.delegate = delegate; 65 } 66 67 public VirtualFileHandler findChild(String path) throws IOException 68 { 69 return delegate.findChild(path); 70 } 71 72 public List <VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException 73 { 74 return delegate.getChildren(ignoreErrors); 75 } 76 77 public long getLastModified() throws IOException 78 { 79 return delegate.getLastModified(); 80 } 81 82 public long getSize() throws IOException 83 { 84 return delegate.getSize(); 85 } 86 87 public boolean isLeaf() throws IOException 88 { 89 return delegate.isLeaf(); 90 } 91 92 public boolean isHidden() throws IOException 93 { 94 return delegate.isHidden(); 95 } 96 97 public InputStream openStream() throws IOException 98 { 99 return delegate.openStream(); 100 } 101 102 public URI toURI() throws URISyntaxException 103 { 104 return delegate.toURI(); 105 } 106 107 public URL toURL() throws URISyntaxException , MalformedURLException 108 { 109 return delegate.toURL(); 110 } 111 } 112 | Popular Tags |