public class NonLockingJarUrlConnection extends JarURLConnection
The setupPathedInputStream() method has been modified to improve the speed of resource lookups. It now uses a ZipEntry to get random access to entries in the JAR.
This change removes the ability for this connection class to load resources from JARs nested inside the outer
JAR. This is not used in atlassian-plugin because the inner JAR loading is handled by
PluginClassLoader.
jarFileURLConnectionallowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
protected URL |
getBaseResource()
Retrieve the base resource
URL. |
InputStream |
getInputStream() |
JarFile |
getJarFile() |
protected InputStream |
getSegmentInputStream(InputStream baseIn,
String segment)
Retrieve the
InputStream for the nesting
segment relative to a base InputStream. |
protected String[] |
getSegments()
Retrieve the nesting path segments.
|
protected static URL |
normaliseURL(URL url) |
protected void |
setupBaseResourceInputStream()
Setup the
InputStream purely from the base resource. |
protected void |
setupPathedInputStream()
Setup the
InputStream for URL with nested segments. |
getAttributes, getCertificates, getEntryName, getJarEntry, getJarFileURL, getMainAttributes, getManifestaddRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, 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, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringprotected static URL normaliseURL(URL url) throws MalformedURLException
MalformedURLExceptionprotected String[] getSegments()
protected URL getBaseResource()
URL.public void connect()
throws IOException
connect in class URLConnectionIOExceptionURLConnectionprotected void setupBaseResourceInputStream()
throws IOException
InputStream purely from the base resource.IOException - If an I/O error occurs.protected void setupPathedInputStream()
throws IOException
InputStream for URL with nested segments.IOException - If an I/O error occurs.protected InputStream getSegmentInputStream(InputStream baseIn, String segment) throws IOException
InputStream for the nesting
segment relative to a base InputStream.baseIn - The base input-stream.segment - The nesting segment path.IOException - If an I/O error occurs.public InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionURLConnectionpublic JarFile getJarFile() throws IOException
getJarFile in class JarURLConnectionIOExceptionJarURLConnection.getJarFile()Copyright © 2019 Atlassian. All rights reserved.