1 22 package org.jboss.net.protocol.vfsfile; 23 24 import org.jboss.virtual.VirtualFile; 25 26 import java.io.IOException ; 27 import java.io.InputStream ; 28 import java.net.URL ; 29 import java.net.URLConnection ; 30 31 37 public class VirtualFileURLConnection extends URLConnection 38 { 39 protected VirtualFile file; 40 41 public VirtualFileURLConnection(URL url, VirtualFile file) 42 { 43 super(url); 44 this.file = file; 45 } 46 47 public void connect() throws IOException 48 { 49 } 50 51 public VirtualFile getVirtualFile() 52 { 53 return file; 54 } 55 56 57 public InputStream getInputStream() throws IOException 58 { 59 return file.openStream(); 60 } 61 } 62 | Popular Tags |