String inputLine = "";
// 得到传回的数据
while ((inputLine = inBuff.readLine()) != null) {
recieveData += inputLine.trim();
}
} catch (SocketTimeoutException timeOutEx) {
timeOutEx.printStackTrace();
} catch (IOException IoEx) {
IoEx.printStackTrace();
} catch (Throwable Ex) {
Ex.printStackTrace();
} finally {
// 关闭连接
try {
if (con != null) {
con.disconnect();
}
if (out != null) {
out.close();
}
if (inBuff != null) {
inBuff.close();
}
} catch (IOException IoEx) {
} catch (Throwable Ex) {
}
}
if (recieveData != null) {
return recieveData.trim();
} else {
return "";
}
}