I use Java 6. I was doing the integration with IBPT and used this code:
URL url = new URL("http://iws.ibpt.org.br/api/deolhonoimposto/Produtos?");
InputStream input = url.openStream();
It worked fine, but the web service changed and now the url uses https:
URL url = new URL("https://apidoni.ibpt.org.br/api/v1/produtos?");
InputStream input = url.openStream();
And started to give this error "java.net.SocketException: Connection reset".