Skip to content

Commit

Permalink
use BoundedInputStream.builder
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiede committed Apr 11, 2024
1 parent 8f25e95 commit 66cf28e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/java/com/jcraft/jsch/AbstractBufferMargin.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ private void doScp(Session session, boolean debugException) throws Exception {
byte[] buf = new byte[17];
is.read(buf, 0, 17);
sendAck(os);
Files.copy(new BoundedInputStream(is, 100L * 1024L), out);
Files.copy(
BoundedInputStream.builder().setMaxCount(100L * 1024L).setInputStream(is).get(),
out);
checkAck(is);
sendAck(os);
}
Expand Down

0 comments on commit 66cf28e

Please sign in to comment.