fix FileUtils performance regression due to FilterOutputStream (#8024)

This commit is contained in:
Himanshu 2019-07-04 08:41:17 -07:00 committed by Fangjin Yang
parent e6ba258197
commit 6760505a7e
1 changed files with 8 additions and 0 deletions

View File

@ -242,6 +242,14 @@ public class FileUtils
{
return new FilterOutputStream(out)
{
// Default implementation of this method in FilterOutputStream converts single write operation to
// multiple write operations of 1 byte each, which is terribly inefficient.
@Override
public void write(byte b[], int off, int len) throws IOException
{
out.write(b, off, len);
}
@Override
public void close()
{