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 voidconnect()java.util.jar.AttributesgetAttributes()java.security.cert.Certificate[]getCertificates()intgetContentLength()java.lang.StringgetEntryName()java.io.InputStreamgetInputStream()java.util.jar.JarEntrygetJarEntry()java.util.jar.JarFilegetJarFile()java.net.URLgetJarFileURL()java.util.jar.ManifestgetManifest()java.io.OutputStreamgetOutputStream()-
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:
connectin classjava.net.URLConnection
-
getAttributes
public java.util.jar.Attributes getAttributes() throws java.io.IOException
- Overrides:
getAttributesin classjava.net.JarURLConnection- Throws:
java.io.IOException
-
getCertificates
public java.security.cert.Certificate[] getCertificates()
- Overrides:
getCertificatesin classjava.net.JarURLConnection
-
getContentLength
public int getContentLength()
- Overrides:
getContentLengthin classjava.net.URLConnection
-
getEntryName
public java.lang.String getEntryName()
- Overrides:
getEntryNamein classjava.net.JarURLConnection
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Overrides:
getInputStreamin classjava.net.URLConnection- Throws:
java.io.IOException
-
getJarEntry
public java.util.jar.JarEntry getJarEntry() throws java.io.IOException
- Overrides:
getJarEntryin classjava.net.JarURLConnection- Throws:
java.io.IOException
-
getJarFile
public java.util.jar.JarFile getJarFile() throws java.io.IOException
- Specified by:
getJarFilein classjava.net.JarURLConnection- Throws:
java.io.IOException
-
getJarFileURL
public java.net.URL getJarFileURL()
- Overrides:
getJarFileURLin classjava.net.JarURLConnection
-
getManifest
public java.util.jar.Manifest getManifest() throws java.io.IOException
- Overrides:
getManifestin classjava.net.JarURLConnection- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException
- Overrides:
getOutputStreamin classjava.net.URLConnection- Throws:
java.io.IOException
-
-