Skip to content

Instantly share code, notes, and snippets.

@asdf913
Created September 9, 2020 02:33
Show Gist options
  • Save asdf913/5c4b9629c5d2683bac4231634ce8210e to your computer and use it in GitHub Desktop.
Save asdf913/5c4b9629c5d2683bac4231634ce8210e to your computer and use it in GitHub Desktop.
SSLTester
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