Package com.iizix.util.xjar
Class XJarURLConnection
java.lang.Object
java.net.URLConnection
com.iizix.util.AbstractJarURLConnection
com.iizix.util.xjar.XJarURLConnection
Extends the JarURLConnection to handle XJarFile instead of JarFile's.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.util.AbstractJarURLConnection
jarFileURLConnection
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor Summary
ModifierConstructorDescriptionprotected
XJarURLConnection
(URL url) Creates an XJar URL connection.protected
XJarURLConnection
(URL url, XJarFile jarFile) Creates an XJar URL connection.Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.Returns an input stream that reads from this open connection.Gets the IJarFile.Methods inherited from class com.iizix.util.AbstractJarURLConnection
getAttributes, getCertificates, getEntryName, getJarEntry, getJarFileURL, getMainAttributes, getManifest
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
Constructor Details
XJarURLConnection
Creates an XJar URL connection.- Parameters:
url
- The requested URL.- Throws:
MalformedURLException
XJarURLConnection
Creates an XJar URL connection.- Parameters:
url
- The requested URL.jarFile
- The open Jar file.- Throws:
MalformedURLException
Method Details
getJarFile
Gets the IJarFile.- Specified by:
getJarFile
in classAbstractJarURLConnection
- Returns:
- The IJarFile instance.
- Throws:
IOException
- if an IOException occurs while trying to connect to the JAR file for this connection.- See Also:
connect
Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.If the
connect
method is called when the connection has already been opened (indicated by theconnected
field having the valuetrue
), the call is ignored.- Specified by:
connect
in classURLConnection
- Throws:
IOException
- if an I/O error occurs while opening the connection.
getInputStream
Returns an input stream that reads from this open connection.- Overrides:
getInputStream
in classURLConnection
- Returns:
- an input stream that reads from this open connection.
- Throws:
IOException
- if an I/O error occurs while creating the input stream.