Skip to content

Commit 528aaaa

Browse files
committed
use IOUtil.copy() API
1 parent 146b092 commit 528aaaa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/org/codehaus/plexus/archiver/zip/AbstractZipUnArchiver.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,12 @@ protected void extractFile( final File srcF, final File dir, final InputStream c
214214
}
215215
else
216216
{
217-
final byte[] buffer = new byte[1024];
218-
int length;
219217
OutputStream out = null;
220218
try
221219
{
222220
out = new FileOutputStream( f );
223221

224-
while ( ( length = compressedInputStream.read( buffer ) ) >= 0 )
225-
{
226-
out.write(buffer, 0, length);
227-
}
222+
IOUtil.copy( compressedInputStream, out );
228223
}
229224
finally
230225
{

0 commit comments

Comments
 (0)