This commit is contained in:
jogra 2022-07-05 13:26:34 +00:00
parent 97b2c4d6ea
commit 535abc8f7a
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class InputStreamToOutputStreamUnitTest {
void copy(InputStream source, OutputStream target) throws IOException {
byte[] buf = new byte[8192];
int length;
while ((length = source.read(buf)) > 0) {
while ((length = source.read(buf)) != -1) {
target.write(buf, 0, length);
}
}