Created
July 2, 2013 15:07
-
-
Save mjgp2/5910088 to your computer and use it in GitHub Desktop.
This doesn't work with Java 7u21 - the root ceritifcate isn't installed in the JDK. java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import com.google.common.io.ByteStreams; | |
public class Test { | |
public static void main(String[] args) throws MalformedURLException, IOException { | |
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); | |
ByteStreams.copy(new URL("https://www.lexisnexis.com/wsapi/v1/services/Authentication").openStream(), byteArrayOutputStream); | |
System.out.println(new String( byteArrayOutputStream.toByteArray())); | |
} | |
} |
Author
mjgp2
commented
Jul 2, 2013
Also fails with java 7u25
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment