Class AutoLFOutputStream

java.lang.Object
java.io.OutputStream
org.eclipse.jgit.util.io.AutoLFOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class AutoLFOutputStream extends OutputStream
An OutputStream that reduces CRLF to LF.

Existing single CR are not changed to LF, but retained as is.

A binary check on the first 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.

Since:
4.3