A bit of background, I'm trying to create a URL Stream Handler so I can keep track of how many connections I have active on my webview in my javafx application. Essentially, I'm running an AngularJs app in the WebView, and I'd like to know when it's finished. I can't touch the web site code, so adding a js notifier is not on the table. So, no matter what I put together, the setup always errors with 'protocol doesn't support input.' I've tried to override 'getDoInput' with a method that only returns false, but I still get the error. Any ideas?
Here is something close to what I'm doing:
public class MyUrlStreamHandlerFactory implements URLStreamHandlerFactory {
    public URLStreamHandler createURLStreamHandler(String protocol) {
        if (protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) {
            return new URLStreamHandler() {
                @Override
                protected URLConnection openConnection(URL url) throws IOException {
                    return new HttpURLConnection(url) {
                        @Override
                        public void connect() throws IOException {
                        }
                        @Override
                        public void disconnect() {
                        }
                        @Override
                        public boolean usingProxy() {
                            return false;
                        }
                        @Override
                        public boolean getDoInput() {
                            return false;
                        }
                    };
                }
            };
        }
        return null;
    }
}
I'm installing it with:
URL.setURLStreamHandlerFactory(new MyUrlStreamHandlerFactory());
 
     
    