Class Handler
java.lang.Object
java.net.URLStreamHandler
org.springframework.boot.loader.jar.Handler
URLStreamHandler
for Spring Boot loader JarFile
s.- Since:
- 1.0.0
- Author:
- Phillip Webb, Andy Wilkinson
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRootJarFileFromUrl
(URL url) protected int
protected URLConnection
openConnection
(URL url) protected void
protected boolean
static void
setUseFastConnectionExceptions
(boolean useFastConnectionExceptions) Set if a generic static exception can be thrown when a URL cannot be connected.Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hostsEqual, openConnection, setURL, setURL, toExternalForm
-
Constructor Details
-
Handler
public Handler() -
Handler
-
-
Method Details
-
openConnection
- Specified by:
openConnection
in classURLStreamHandler
- Throws:
IOException
-
parseURL
- Overrides:
parseURL
in classURLStreamHandler
-
hashCode
- Overrides:
hashCode
in classURLStreamHandler
-
sameFile
- Overrides:
sameFile
in classURLStreamHandler
-
getRootJarFileFromUrl
- Throws:
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.- Parameters:
useFastConnectionExceptions
- if fast connection exceptions can be used.
-