java.lang.Object
java.io.OutputStream
org.eclipse.jgit.util.io.AutoCRLFOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An OutputStream that expands LF to CRLF.
Existing CRLF are not expanded to CRCRLF, 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).-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for AutoCRLFOutputStream.AutoCRLFOutputStream(OutputStream out, boolean detectBinary) Constructor for AutoCRLFOutputStream. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
AutoCRLFOutputStream
Constructor for AutoCRLFOutputStream.
- Parameters:
out- aOutputStreamobject.
-
AutoCRLFOutputStream
Constructor for AutoCRLFOutputStream.
- Parameters:
out- aOutputStreamobject.detectBinary- whether binaries should be detected- Since:
- 4.3
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-