AutoCRLFOutputStream: use BufferedOutputStream
This should improve performance of autocrlf checkout. Bug: 580651 Change-Id: I2e2fe0273ac3c71fad50a575278234804ee28306
This commit is contained in:
parent
f71fcbf36b
commit
eb5124c74f
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
package org.eclipse.jgit.util.io;
|
package org.eclipse.jgit.util.io;
|
||||||
|
|
||||||
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
@ -58,7 +59,9 @@ public AutoCRLFOutputStream(OutputStream out) {
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
*/
|
*/
|
||||||
public AutoCRLFOutputStream(OutputStream out, boolean detectBinary) {
|
public AutoCRLFOutputStream(OutputStream out, boolean detectBinary) {
|
||||||
this.out = out;
|
// avoid to write single lines directly to FileOutputStream:
|
||||||
|
this.out = out instanceof BufferedOutputStream ? out
|
||||||
|
: new BufferedOutputStream(out);
|
||||||
this.detectBinary = detectBinary;
|
this.detectBinary = detectBinary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue