M*D
2 楼
最初的印象是各种娱乐新闻关于她的奇装异服,
觉得这人有特殊癖好,矫揉造作,绝不是我喜欢的那种。
从没想过去听她的歌,或刻意地去寻找她的什么。
可昨晚无聊,听了一首Bad Romance,现在是越来越喜欢了。
觉得这人有特殊癖好,矫揉造作,绝不是我喜欢的那种。
从没想过去听她的歌,或刻意地去寻找她的什么。
可昨晚无聊,听了一首Bad Romance,现在是越来越喜欢了。
m*n
3 楼
大家一般都去哪呀?
W*t
4 楼
从书上抄的CODE。
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;
public class URLTester
{
public static void main(String[] args) throws IOException
{
String urlString;
if(args.length == 1)
urlString = args[0];
else
{
System.out.println("Wrong URL!");
return;
}
URL u = new URL(urlString);
URLConnection con = u.openConnection();
HttpURLConnection httpCon = (HttpURLConnection)con;
int code = httpCon.getResponseCode();
String message = httpCon.getResponseMessage();
System.out.println(code+ " "+ message);
if(code != HttpURLConnection.HTTP_OK)
{
System.out.println("Bad URL Connection!");
return;
}
InputStream inStream = con.getInputStream();
Scanner in = new Scanner(inStream);
while(in.hasNextLine())
{
String input = in.nextLine();
System.out.println(input);
}
}
}
有的网页能运行,没有问题。 有网页显示完SOURCE CODE 以后程序没法结束。
TERMINAL 光标一直闪,回不到提示符下。比如以下网页:
http://www.amazon.com/Crucial-2-5-Inch-adapter-Internal-CT120M5
不知道是怎么回事, 哪位能解释一下。多谢了。
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;
public class URLTester
{
public static void main(String[] args) throws IOException
{
String urlString;
if(args.length == 1)
urlString = args[0];
else
{
System.out.println("Wrong URL!");
return;
}
URL u = new URL(urlString);
URLConnection con = u.openConnection();
HttpURLConnection httpCon = (HttpURLConnection)con;
int code = httpCon.getResponseCode();
String message = httpCon.getResponseMessage();
System.out.println(code+ " "+ message);
if(code != HttpURLConnection.HTTP_OK)
{
System.out.println("Bad URL Connection!");
return;
}
InputStream inStream = con.getInputStream();
Scanner in = new Scanner(inStream);
while(in.hasNextLine())
{
String input = in.nextLine();
System.out.println(input);
}
}
}
有的网页能运行,没有问题。 有网页显示完SOURCE CODE 以后程序没法结束。
TERMINAL 光标一直闪,回不到提示符下。比如以下网页:
http://www.amazon.com/Crucial-2-5-Inch-adapter-Internal-CT120M5
不知道是怎么回事, 哪位能解释一下。多谢了。
g*l
5 楼
顶一下
s*s
15 楼
来一首抒情的gaga - speechless
相关阅读
jar启动时的内存设置Looking for a Senior Java Developer/lead position求C++的书, 本人会Core Java (转载)c,java, 数据库内核,数据库应用弱问问题,谁用过profilerBrainbench test (转载)any good conference for Java recently?帮我了解一下64bit JVMPost some positions from my company最近貌似mitbbs速度还可以,所以才有点积极性来坛子看看啦view templating technologyj2ee without EJBSCEA 可以直接考吧问个多线程的问题问个多线程问题Spring被VMWare买了Regular Expression question: how to enumerate all matches?问题一个弱弱的问题这个合并以后,是不是现在学java已经没有前途了?jboss hot deployment in eclipse