26 |
con.setConnectTimeout( timeout ); |
con.setConnectTimeout( timeout ); |
27 |
InputStream is = con.getInputStream(); |
InputStream is = con.getInputStream(); |
28 |
ByteArrayOutputStream os = new ByteArrayOutputStream(); |
ByteArrayOutputStream os = new ByteArrayOutputStream(); |
29 |
byte[] message = new byte[1024]; |
byte[] message = new byte[8192]; |
30 |
int readBytes = 0;; |
int readBytes = 0;; |
31 |
while ((readBytes = is.read(message)) != -1) { |
while ((readBytes = is.read(message)) != -1) { |
32 |
os.write(message, 0, readBytes); |
os.write(message, 0, readBytes); |