类 Handler
- java.lang.Object
- java.net.URLStreamHandler
- org.springframework.boot.loader.jar.Handler
public class Handler extends URLStreamHandler
URLStreamHandler
for Spring Boot loaderJarFile
s.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 JarFile
getRootJarFileFromUrl(URL url)
protected int
hashCode(URL u)
protected URLConnection
openConnection(URL url)
protected void
parseURL(URL context, String spec, int start, int limit)
protected boolean
sameFile(URL u1, URL u2)
static void
setUseFastConnectionExceptions(boolean useFastConnectionExceptions)
Set if a generic static exception can be thrown when a URL cannot be connected.从类继承的方法 java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hostsEqual, openConnection, setURL, setURL, toExternalForm
方法详细资料
openConnection
protected URLConnection openConnection(URL url) throws IOException
- 指定者:
openConnection
在类中URLStreamHandler
- 抛出:
IOException
parseURL
protected void parseURL(URL context, String spec, int start, int limit)
- 覆盖:
parseURL
在类中URLStreamHandler
hashCode
protected int hashCode(URL u)
- 覆盖:
hashCode
在类中URLStreamHandler
sameFile
protected boolean sameFile(URL u1, URL u2)
- 覆盖:
sameFile
在类中URLStreamHandler
getRootJarFileFromUrl
public JarFile getRootJarFileFromUrl(URL url) throws IOException
- 抛出:
IOException
setUseFastConnectionExceptions
public static void setUseFastConnectionExceptions(boolean useFastConnectionExceptions)
Set if a generic static exception can be thrown when a URL cannot be connected. This optimization is used during class loading to save creating lots of exceptions which are then swallowed.- 参数:
useFastConnectionExceptions
- if fast connection exceptions can be used.