File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
src/test/java/org/apache/commons/codec/digest Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 2929import java .net .URL ;
3030import java .util .stream .Stream ;
3131
32+ import org .apache .commons .io .IOUtils ;
3233import org .junit .jupiter .params .ParameterizedTest ;
3334import org .junit .jupiter .params .provider .Arguments ;
3435import org .junit .jupiter .params .provider .MethodSource ;
3536
3637public class XXHash32Test {
3738
3839 private static long copy (final InputStream input , final OutputStream output , final int bufferSize ) throws IOException {
39- final byte [] buffer = new byte [bufferSize ];
40- int n = 0 ;
41- long count = 0 ;
42- while (-1 != (n = input .read (buffer ))) {
43- output .write (buffer , 0 , n );
44- count += n ;
45- }
46- return count ;
40+ return IOUtils .copyLarge (input , output , new byte [bufferSize ]);
4741 }
4842
4943 public static Stream <Arguments > data () {
You can’t perform that action at this time.
0 commit comments