Created
September 9, 2020 02:33
-
-
Save asdf913/5c4b9629c5d2683bac4231634ce8210e to your computer and use it in GitHub Desktop.
SSLTester
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.BufferedReader; | |
import java.net.URL; | |
public class SSLTester { | |
public static void main(final String[] args) throws java.io.IOException { | |
// | |
final URL url = new URL("http://httpstat.us/200"); | |
// | |
try (final java.io.InputStream is = url.openStream(); | |
final java.io.Reader r = new java.io.InputStreamReader(is); | |
final BufferedReader br = new BufferedReader(r)) { | |
// | |
String line = null; | |
while ((line = br.readLine()) != null) { | |
System.out.println(line); | |
} // while | |
// | |
} // try | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment