Class Handler
java.lang.Object
java.net.URLStreamHandler
org.springframework.boot.loader.jar.Handler
URLStreamHandler for Spring Boot loader JarFiles.- Since:
- 1.0.0
- Author:
- Phillip Webb, Andy Wilkinson
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRootJarFileFromUrl(URL url) protected intprotected URLConnectionopenConnection(URL url) protected voidprotected booleanstatic voidsetUseFastConnectionExceptions(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:
openConnectionin classURLStreamHandler- Throws:
IOException
-
parseURL
- Overrides:
parseURLin classURLStreamHandler
-
hashCode
- Overrides:
hashCodein classURLStreamHandler
-
sameFile
- Overrides:
sameFilein 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.
-