用urlConnection建立http连接,怎么才可以提高传输的速度?String strResponse = "";
URL url;
URLConnection urlConnection; url = new URL(m_strUrl); urlConnection = url.openConnection();  //--------这里要耗时16ms
urlConnection.setDoOutput(true); // 需要向服务器写数据
urlConnection.setDoInput(true); // 
urlConnection.setUseCaches(false); // 获得服务器最新的信息
urlConnection.setAllowUserInteraction(false);
urlConnection.setReadTimeout(50);
urlConnection.setRequestProperty("Content-type",
"application/x-www-form-urlencoded");
// 必须告诉服务器你发送的数据大小. 这也同样告诉
urlConnection.setRequestProperty("Content-length", ""
+ m_strRequest.length());
// Open an output stream so you can send the info you are posting
try
{  //-----------这里要16ms
dataOutputStream = new DataOutputStream(urlConnection.getOutputStream());
}
catch(Exception e)
{
System.out.println(url.toString()+":连接超时!");
return "";
}

// Write out the actual request data
dataOutputStream.writeBytes(m_strRequest);
dataOutputStream.close();
// 判断访问服务器的返回值
boolean loop=true;
InputStreamReader netin=new InputStreamReader(urlConnection.getInputStream());
BufferedReader in=new BufferedReader(netin);
String str="";

while (loop)    //这里要16ms {
if (in.ready())
{
while (true)
{
str = in.readLine();
if (str == null)
{
loop = false;
break;
}
strResponse += str;
}
}
}
return strResponse;
}}红色的是传输7k文件所要消耗的时间,有没有什么方法可以提高传输的速度?是不是有更好的代码。
希望高手指教,现在这里的速度是我们软件的瓶颈