diff --git a/privmx-endpoint-extra/src/main/java/com/simplito/java/privmx_endpoint_extra/inboxFileStream/InboxFileStreamWriter.java b/privmx-endpoint-extra/src/main/java/com/simplito/java/privmx_endpoint_extra/inboxFileStream/InboxFileStreamWriter.java index b65d851..1458e65 100644 --- a/privmx-endpoint-extra/src/main/java/com/simplito/java/privmx_endpoint_extra/inboxFileStream/InboxFileStreamWriter.java +++ b/privmx-endpoint-extra/src/main/java/com/simplito/java/privmx_endpoint_extra/inboxFileStream/InboxFileStreamWriter.java @@ -105,15 +105,15 @@ public void writeStream(long inboxHandle, InputStream inputStream, StoreFileStre setProgressListener(streamController); } byte[] chunk = new byte[(int) InboxFileStream.OPTIMAL_SEND_SIZE]; - int readed; + int read; while (true) { if (streamController != null && streamController.isStopped()) { return; } - if ((readed = inputStream.read(chunk)) <= 0) { + if ((read = inputStream.read(chunk)) <= 0) { return; } - write(inboxHandle, Arrays.copyOf(chunk, readed)); + write(inboxHandle, Arrays.copyOf(chunk, read)); } } }