Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Increased maximum buffer size in network file transfers from 4096 byt… #57

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;

Expand Down