super();
if (socket == null) {
throw new IllegalArgumentException("Socket may not be null");
}
if (buffersize < 0) {
buffersize = socket.getReceiveBufferSize();
// BEGIN android-changed
// Workaround for http://b/issue?id=1083103.
if (buffersize > 8096) {
buffersize = 8096;
}
// END android-changed
}
if (buffersize < 1024) {
buffersize = 1024;
}
// BEGIN android-changed
socket.setSendBufferSize(buffersize * 3);
// END andrdoid-changed
init(socket.getOutputStream(), buffersize, params);