/* */ package org.jboss.virtual.plugins.context.vfs;
/* */
/* */ import java.io.IOException;
/* */ import java.net.URL;
/* */ import java.net.URLConnection;
/* */ import java.net.URLStreamHandler;
/* */ import org.jboss.virtual.plugins.vfs.VirtualFileURLConnection;
/* */ import org.jboss.virtual.spi.VirtualFileHandler;
/* */
/* */ public class AssembledUrlStreamHandler extends URLStreamHandler
/* */ {
/* */ private final AssembledContext context;
/* */
/* */ public AssembledUrlStreamHandler(AssembledContext context)
/* */ {
/* 44 */ this.context = context;
/* */ }
/* */
/* */ protected URLConnection openConnection(URL url) throws IOException
/* */ {
/* 49 */ String path = url.getPath();
/* 50 */ VirtualFileHandler vf = this.context.getRoot().findChild(path);
/* 51 */ if (vf == null) {
/* 52 */ throw new IOException(path + " was not found in Assembled VFS context " + this.context.getName());
/* */ }
/* 54 */ return new VirtualFileURLConnection(url, vf.getVirtualFile());
/* */ }
/* */ }
/* Location: /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name: org.jboss.virtual.plugins.context.vfs.AssembledUrlStreamHandler
* JD-Core Version: 0.6.0
*/