public class CloseableJarHandler
extends sun.net.www.protocol.jar.Handler
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.
Constructor and Description |
---|
CloseableJarHandler() |
Modifier and Type | Method and Description |
---|---|
void |
closeStreams(String jarFilePath)
Closes all InputStreams that were created by the URL system that point at the given Jar file.
|
protected URLConnection |
openConnection(URL jarUrl) |
equals, getDefaultPort, getHostAddress, hostsEqual, openConnection, setURL, setURL, toExternalForm
public void closeStreams(String jarFilePath) throws IOException
IOException
protected URLConnection openConnection(URL jarUrl) throws IOException
openConnection
in class sun.net.www.protocol.jar.Handler
IOException
Copyright © 2018. All rights reserved.