diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java index 195fdb4213..e08a53f502 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java @@ -22,23 +22,21 @@ import org.eclipse.jgit.diff.RawText; * Existing single CR are not changed to LF, but retained as is. * </p> * <p> - * A binary check on the first 8000 bytes is performed and in case of binary - * files, canonicalization is turned off (for the complete file). If the binary - * check determines that the input is not binary but text with CR/LF, - * canonicalization is also turned off. + * A binary check on the first {@link RawText#getBufferSize()} bytes is + * performed and in case of binary files, canonicalization is turned off (for + * the complete file). If the binary check determines that the input is not + * binary but text with CR/LF, canonicalization is also turned off. * </p> * * @since 4.3 */ public class AutoLFOutputStream extends OutputStream { - static final int BUFFER_SIZE = 8000; - private final OutputStream out; private int buf = -1; - private byte[] binbuf = new byte[BUFFER_SIZE]; + private byte[] binbuf = new byte[RawText.getBufferSize()]; private byte[] onebytebuf = new byte[1]; |