org.jboss.virtual.plugins.vfs
Class VirtualFileURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by org.jboss.virtual.plugins.vfs.VirtualFileURLConnection

public class VirtualFileURLConnection
extends java.net.URLConnection

Implements basic URLConnection for a VirtualFile

Version:
$Revision: 1.1 $
Author:
Bill Burke

Field Summary
protected  VirtualFile file
           
protected  java.lang.String relativePath
           
static java.util.Map<java.net.URL,VFS> urlCache
           
protected  java.net.URL vfsurl
           
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
VirtualFileURLConnection(java.net.URL url, java.net.URL vfsurl, java.lang.String relativePath)
           
 
Method Summary
 void connect()
           
 java.io.InputStream getInputStream()
           
 VirtualFile getVirtualFile()
           
static VirtualFile resolveCachedVirtualFile(java.net.URL vfsurl, java.lang.String relativePath)
           
static VirtualFile resolveVirtualFile(java.net.URL vfsurl, java.lang.String relativePath)
           
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

urlCache

public static java.util.Map<java.net.URL,VFS> urlCache

file

protected VirtualFile file

vfsurl

protected java.net.URL vfsurl

relativePath

protected java.lang.String relativePath
Constructor Detail

VirtualFileURLConnection

public VirtualFileURLConnection(java.net.URL url,
                                java.net.URL vfsurl,
                                java.lang.String relativePath)
Method Detail

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in class java.net.URLConnection
Throws:
java.io.IOException

resolveCachedVirtualFile

public static VirtualFile resolveCachedVirtualFile(java.net.URL vfsurl,
                                                   java.lang.String relativePath)
                                            throws java.io.IOException
Throws:
java.io.IOException

resolveVirtualFile

public static VirtualFile resolveVirtualFile(java.net.URL vfsurl,
                                             java.lang.String relativePath)
                                      throws java.io.IOException
Throws:
java.io.IOException

getVirtualFile

public VirtualFile getVirtualFile()
                           throws java.io.IOException
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class java.net.URLConnection
Throws:
java.io.IOException