匿名 #652(2007/07/12 12:59 GMT) [ Java ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import java.net.URL; import java.net.URLConnection; import java.io.InputStream; import java.io.IOException; public class Sample { static final String url = "http://ja.doukaku.org/feeds/comments/"; static final int BUFFER_SIZE = 2048; public static void main(String[] args) throws IOException { URLConnection uc = new URL(url).openConnection(); InputStream is = uc.getInputStream(); byte[] buffer = new byte[BUFFER_SIZE]; int r; while ((r = is.read(buffer)) > 0) { System.out.write(buffer, 0, r); } } }
Rating0/0=0.00-0+
[ reply ]
匿名
#652()
[
Java
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]