org.jboss.virtual.plugins.vfs
Class VirtualFileURLConnection
java.lang.Object
java.net.URLConnection
org.jboss.virtual.plugins.vfs.VirtualFileURLConnection
public class VirtualFileURLConnection
- extends URLConnection
Implements basic URLConnection for a VirtualFile
- Version:
- $Revision: 1.1 $
- Author:
- Bill Burke, Ales Justin
Methods inherited from class java.net.URLConnection |
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContentEncoding, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString |
file
protected VirtualFile file
vfsurl
protected URL vfsurl
relativePath
protected String relativePath
VirtualFileURLConnection
public VirtualFileURLConnection(URL url,
URL vfsurl,
String relativePath)
VirtualFileURLConnection
public VirtualFileURLConnection(URL url,
VirtualFile file)
connect
public void connect()
throws IOException
- Specified by:
connect
in class URLConnection
- Throws:
IOException
getContent
public VirtualFile getContent()
throws IOException
- Overrides:
getContent
in class URLConnection
- Throws:
IOException
getContentLength
public int getContentLength()
- Overrides:
getContentLength
in class URLConnection
getLastModified
public long getLastModified()
- Overrides:
getLastModified
in class URLConnection
getInputStream
public InputStream getInputStream()
throws IOException
- Overrides:
getInputStream
in class URLConnection
- Throws:
IOException
resolveCachedVirtualFile
protected static VirtualFile resolveCachedVirtualFile(URL vfsurl,
String relativePath)
throws IOException
- Throws:
IOException
resolveVirtualFile
protected static VirtualFile resolveVirtualFile(URL vfsurl,
String relativePath)
throws IOException
- Throws:
IOException
getVirtualFile
protected VirtualFile getVirtualFile()
throws IOException
- Get the virtual file.
- Returns:
- the underlying virtual file
- Throws:
IOException
- for any error
Copyright © 2010 JBoss, A division of Red Hat, Inc. All Rights Reserved.