Class JarURLConnectionImpl
- java.lang.Object
-
- java.net.URLConnection
-
- java.net.JarURLConnection
-
- org.apache.commons.vfs2.provider.jar.JarURLConnectionImpl
-
public class JarURLConnectionImpl extends java.net.JarURLConnection
A default URL connection that will work for most file systems.
-
-
Constructor Summary
Constructors Constructor Description JarURLConnectionImpl(JarFileObject jarFileObject, FileContent fileContent)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
java.util.jar.Attributes
getAttributes()
java.security.cert.Certificate[]
getCertificates()
int
getContentLength()
java.lang.String
getEntryName()
java.io.InputStream
getInputStream()
java.util.jar.JarEntry
getJarEntry()
java.util.jar.JarFile
getJarFile()
java.net.URL
getJarFileURL()
java.util.jar.Manifest
getManifest()
java.io.OutputStream
getOutputStream()
-
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
-
-
-
Constructor Detail
-
JarURLConnectionImpl
public JarURLConnectionImpl(JarFileObject jarFileObject, FileContent fileContent) throws java.net.MalformedURLException, FileSystemException
Constructs a new instance.- Parameters:
jarFileObject
- The JAR file.fileContent
- THe JAR file contents.- Throws:
java.net.MalformedURLException
- Should not happen.FileSystemException
- if an error occurs accessing the JAR file.
-
-
Method Detail
-
connect
public void connect()
- Specified by:
connect
in classjava.net.URLConnection
-
getAttributes
public java.util.jar.Attributes getAttributes() throws java.io.IOException
- Overrides:
getAttributes
in classjava.net.JarURLConnection
- Throws:
java.io.IOException
-
getCertificates
public java.security.cert.Certificate[] getCertificates()
- Overrides:
getCertificates
in classjava.net.JarURLConnection
-
getContentLength
public int getContentLength()
- Overrides:
getContentLength
in classjava.net.URLConnection
-
getEntryName
public java.lang.String getEntryName()
- Overrides:
getEntryName
in classjava.net.JarURLConnection
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Overrides:
getInputStream
in classjava.net.URLConnection
- Throws:
java.io.IOException
-
getJarEntry
public java.util.jar.JarEntry getJarEntry() throws java.io.IOException
- Overrides:
getJarEntry
in classjava.net.JarURLConnection
- Throws:
java.io.IOException
-
getJarFile
public java.util.jar.JarFile getJarFile() throws java.io.IOException
- Specified by:
getJarFile
in classjava.net.JarURLConnection
- Throws:
java.io.IOException
-
getJarFileURL
public java.net.URL getJarFileURL()
- Overrides:
getJarFileURL
in classjava.net.JarURLConnection
-
getManifest
public java.util.jar.Manifest getManifest() throws java.io.IOException
- Overrides:
getManifest
in classjava.net.JarURLConnection
- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException
- Overrides:
getOutputStream
in classjava.net.URLConnection
- Throws:
java.io.IOException
-
-