java.lang.Object
java.io.InputStream
org.eclipse.jgit.util.io.AutoCRLFInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An InputStream that expands LF to CRLF.
Existing CRLF are not expanded to CRCRLF, but retained as is.
Optionally, 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
ConstructorsConstructorDescriptionAutoCRLFInputStream
(InputStream in, boolean detectBinary) Creates a new InputStream, wrapping the specified stream -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
AutoCRLFInputStream
Creates a new InputStream, wrapping the specified stream- Parameters:
in
- raw input streamdetectBinary
- whether binaries should be detected- Since:
- 2.0
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-