[摘要]line.length() == 0)break;int colonBlank = line.indexOf(": ");if (colonBlank != -1) String...
line.length() == 0)
break;
int colonBlank = line.indexOf(": ");
if (colonBlank != -1) {
String name = line.substring(0, colonBlank);
String value = line.substring(colonBlank + 2);
resHeaderNames.addElement(name.toLowerCase());
resHeaderValues.addElement(value);
}
}
inputStarted = true;
}
/**
* Returns a String that represents the value of this object.
* @return a string representation of the receiver
*/
public String toString() {
// Insert code to print the receiver here.
// This implementation forwards the message to super. You may replace or supplement this.
return this.getClass().getName() + ":" + url;
}
}
关键词:一个用来访问http服务器的东西。技巧类似于java.net中的那个。但要强。