public class CloseableJarHandlerFactory extends Object implements URLStreamHandlerFactory
This closing functionality makes it possible to run untrusted plugin code (for example Generators) and still guarantee that there will be no accidental attempts to read from old and deleted Zip files using stale InputStreams.
Modifier and Type | Method and Description |
---|---|
static void |
closeStreams(String jarFilePath)
Closes all InputStreams that were created by the URL system that point at the given Jar file.
|
URLStreamHandler |
createURLStreamHandler(String protocol) |
static void |
installOverride()
Ensures that the standard UrlStreamHandlerFactory has been replaced.
|
public static void closeStreams(String jarFilePath) throws IOException
IOException
public static void installOverride()
public URLStreamHandler createURLStreamHandler(String protocol)
createURLStreamHandler
in interface URLStreamHandlerFactory
Copyright © 2018. All rights reserved.