diff --git a/java/src/main/java/org/whispersystems/signalservice/internal/push/PushServiceSocket.java b/java/src/main/java/org/whispersystems/signalservice/internal/push/PushServiceSocket.java index 5c6ded0177..8fa096ba6b 100644 --- a/java/src/main/java/org/whispersystems/signalservice/internal/push/PushServiceSocket.java +++ b/java/src/main/java/org/whispersystems/signalservice/internal/push/PushServiceSocket.java @@ -469,7 +469,7 @@ private void downloadAttachment(String url, File localDestination, int maxSizeBy OutputStream output = new FileOutputStream(localDestination); InputStream input = connection.getInputStream(); - byte[] buffer = new byte[4096]; + byte[] buffer = new byte[32768]; int contentLength = connection.getContentLength(); int read,totalRead = 0; @@ -521,7 +521,7 @@ private byte[] uploadAttachment(String method, String url, InputStream data, try { DigestingOutputStream out = outputStreamFactory.createFor(connection.getOutputStream()); - byte[] buffer = new byte[4096]; + byte[] buffer = new byte[32768]; int read, written = 0; while ((read = data.read(buffer)) != -1) { @@ -582,7 +582,7 @@ private void downloadFromCdn(File destination, String path, int maxSizeBytes) InputStream in = body.byteStream(); OutputStream out = new FileOutputStream(destination); - byte[] buffer = new byte[4096]; + byte[] buffer = new byte[32768]; int read, totalRead = 0;