类 Handler
- java.lang.Object
 - java.net.URLStreamHandler
 - org.springframework.boot.loader.jar.Handler
 
public class Handler extends URLStreamHandler
URLStreamHandlerfor Spring Boot loaderJarFiles.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 JarFilegetRootJarFileFromUrl(URL url)protected inthashCode(URL u)protected URLConnectionopenConnection(URL url)protected voidparseURL(URL context, String spec, int start, int limit)protected booleansameFile(URL u1, URL u2)static voidsetUseFastConnectionExceptions(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.