当前位置: 编程技术>移动开发
本页文章导读:
▪HttpClient的运用1 HttpClient的使用1
public static String getUrlResponse(String url) {
try {
HttpGet get = new HttpGet(url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
.........
▪ object-c 的错误构造,并抛出 object-c 的异常构造,并抛出
@try {
NSException *exception = [NSException exceptionWithName: @"HotTeaException"
reason: @"The tea is too hot"
.........
▪ 怎么查看那个进程开放了某个端口 如何查看那个进程开放了某个端口
netstat -anp|grep psname
......
[1]HttpClient的运用1
来源: 互联网 发布时间: 2014-02-18
HttpClient的使用1
public static String getUrlResponse(String url) {
try {
HttpGet get = new HttpGet(url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
HttpEntity entity = response.getEntity();
return convertStreamToString(entity.getContent());
} catch (Exception e) {
return null;
}
return null;
}
[2] object-c 的错误构造,并抛出
来源: 互联网 发布时间: 2014-02-18
object-c 的异常构造,并抛出
@try {
NSException *exception = [NSException exceptionWithName: @"HotTeaException"
reason: @"The tea is too hot"
userInfo: nil];
@throw exception;
}
@catch (NSException *exception) {
NSLog(@"main: Caught %@: %@", [exception name], [exception reason]);
}
@finally {
NSLog(@"finally");
}
[3] 怎么查看那个进程开放了某个端口
来源: 互联网 发布时间: 2014-02-18
如何查看那个进程开放了某个端口
netstat -anp|grep psname
netstat -anp|grep psname
最新技术文章: