HttpProtocolParams.setContentCharset(params, HTTP.DEFAULT_CONTENT_CHARSET);
HttpConnectionParams.setTcpNoDelay(params, true);
HttpConnectionParams.setSocketBufferSize(params, 8192);
// determine the release version from packaged version info
final VersionInfo vi = VersionInfo.loadVersionInfo
("org.apache.http.nio.client", DefaultHttpClient.class.getClassLoader());
final String release = (vi != null) ?
vi.getRelease() : VersionInfo.UNAVAILABLE;
HttpProtocolParams.setUserAgent(params,
"Apache-HttpAsyncClient/" + release + " (java 1.5)");
}