[jboss-cvs] JBossAS SVN: r68557 - projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/vfs.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 26 06:53:11 EST 2007
Author: alesj
Date: 2007-12-26 06:53:11 -0500 (Wed, 26 Dec 2007)
New Revision: 68557
Modified:
projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/vfs/AssembledFileHandler.java
Log:
Use delegating handler.
Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/vfs/AssembledFileHandler.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/vfs/AssembledFileHandler.java 2007-12-26 01:26:24 UTC (rev 68556)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/vfs/AssembledFileHandler.java 2007-12-26 11:53:11 UTC (rev 68557)
@@ -22,33 +22,25 @@
package org.jboss.virtual.plugins.context.vfs;
import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.List;
-import org.jboss.virtual.plugins.context.AbstractVirtualFileHandler;
+import org.jboss.virtual.plugins.context.DelegatingHandler;
import org.jboss.virtual.spi.VirtualFileHandler;
/**
* The assembled file handler.
*
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
* @author <a href="bill at jboss.com">Bill Burke</a>
* @version $Revision: 1.1 $
*/
@Assembled
-public class AssembledFileHandler extends AbstractVirtualFileHandler
+public class AssembledFileHandler extends DelegatingHandler
{
- private VirtualFileHandler delegate;
-
public AssembledFileHandler(AssembledContext context, AssembledDirectoryHandler parent, String name, VirtualFileHandler delegate) throws IOException
{
- super(context, parent, name);
- if (delegate == null)
- throw new IllegalArgumentException("Null delegate");
- this.delegate = delegate;
+ super(context, parent, name, delegate);
setVfsUrl(new URL("vfs", context.getName(), -1, getPathName(), new AssembledUrlStreamHandler(context)));
}
@@ -61,49 +53,4 @@
{
throw new IOException("File cannot have children: " + this);
}
-
- public URL toURL() throws MalformedURLException, URISyntaxException
- {
- return delegate.toURL();
- }
-
- public long getLastModified() throws IOException
- {
- return delegate.getLastModified();
- }
-
- public boolean hasBeenModified() throws IOException
- {
- return delegate.hasBeenModified();
- }
-
- public long getSize() throws IOException
- {
- return delegate.getSize();
- }
-
- public boolean exists() throws IOException
- {
- return delegate.exists();
- }
-
- public boolean isLeaf() throws IOException
- {
- return delegate.isLeaf();
- }
-
- public boolean isHidden() throws IOException
- {
- return delegate.isHidden();
- }
-
- public InputStream openStream() throws IOException
- {
- return delegate.openStream();
- }
-
- public URI toURI() throws URISyntaxException
- {
- return delegate.toURI();
- }
}
More information about the jboss-cvs-commits
mailing list