大法师广泛的
Posted oilover
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了大法师广泛的相关的知识,希望对你有一定的参考价值。
import java.io.*;
import java.net.URL;
public class Love
public static void main(String[] args) throws IOException
// TODO Auto-generated method stub
System.out.println("Hello World!");
String fileName = "secLZW.zip"; //The file that will be saved on your computer
URL link = new URL(" http://www.hooklee.com/Papers/ICME2011_SecLZW.zip");
//The file that you want to download
//Code to download
InputStream in = new BufferedInputStream(link.openStream());
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int n = 0;
while (-1!=(n=in.read(buf)))
out.write(buf, 0, n);
out.close();
in.close();
byte[] response = out.toByteArray();
FileOutputStream fos = new FileOutputStream(fileName);
fos.write(response);
fos.close();
//End download code
System.out.println("Finished");
一个简单的Visual C++窗口程序:
以上是关于大法师广泛的的主要内容,如果未能解决你的问题,请参考以下文章