【发布时间】:2017-02-14 15:45:29
【问题描述】:
我已通读 Android 的 Security with HTTPS and SSL 文档。我看到它一直在使用copyInputStreamToOutputStream(in, System.out);。这给了我
error: cannot find symbol method copyInputStreamToOutputStream(InputStream,PrintStream)
这是有问题的代码:
URL url = new URL("https://wikipedia.org");
URLConnection urlConnection = url.openConnection();
InputStream in = urlConnection.getInputStream();
copyInputStreamToOutputStream(in, System.out);
copyInputStreamToOutputStream是什么意思?
【问题讨论】:
-
对我来说看起来像是一种将输入流复制到输出流的方法。他们似乎没有提供它,但它只有六行代码左右。