HttpParams params = new BasicHttpParams();
// Set the timeout in milliseconds until a connection is established.
// The default value is zero, that means the timeout is not used.
int timeoutConnection = 60000;
HttpConnectionParams.setConnectionTimeout(params, timeoutConnection);
params.setParameter(CoreProtocolPNames.PROTOCOL_VERSION,
HttpVersion.HTTP_1_1);
// Set the default socket timeout (SO_TIMEOUT)
// in milliseconds which is the timeout for waiting for data.
int timeoutSocket = 60000;
HttpConnectionParams.setSoTimeout(params, timeoutSocket);
httpclient = new DefaultHttpClient(params);
response = httpclient.execute(httppost);
byte[] buffer = new byte[1024];
int bufferLength = 0;
InputStream inputStream = response.getEntity().getContent();
totalSize = 0;
while ((bufferLength = inputStream.read(buffer)) > 0) {
totalSize += bufferLength;
// onProgressTitleUpdate("Calculating size...");
}
Здесь я не смог получить все данные с сервера, используя http response.i получил только минимальный размер данных ..