2013-12-21 56 views
1

我注意到似乎沒有辦法指定複製方法的字節長度。 copyLarge(InputStream input, OutputStream output, long inputOffset, long length)基本上是我在找的東西,但API聲明這是爲超過2GB的文件,這不一定是我的情況。IOUtils.copy達到指定長度

回答

1

copyLarge(InputStream input, OutputStream output, long inputOffset, long length)正在使用4kb的複製緩衝區。所以你可以使用它也適用於較小的文件。

+0

那很好聽。方法描述有點誤導。 –