2007-07-26から1日間の記事一覧

Proxy経由でURLからコンテンツを取得するとき

URLを指定してHTMLなどのファイルを取得するには以下のコードでできます。 public void downloadFile(URL url, File file) throws IOException { InputStream in = null; OutputStream out = null; try { in = url.openStream(); out = new FileOutputStream…