Package org.apache.commons.io.input
Class WindowsLineEndingInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.io.input.WindowsLineEndingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
A filtering input stream that ensures the content will have Windows line endings, CRLF.
- Since:
- 2.5
-
Constructor Summary
ConstructorsConstructorDescriptionWindowsLineEndingInputStream(InputStream in, boolean ensureLineFeedAtEndOfFile) Constructs an input stream that filters another stream -
Method Summary
Methods inherited from class java.io.InputStream
available, markSupported, read, read, reset, skip
-
Constructor Details
-
WindowsLineEndingInputStream
Constructs an input stream that filters another stream- Parameters:
in- The input stream to wrapensureLineFeedAtEndOfFile- true to ensure that the file ends with CRLF
-
-
Method Details
-
close
Closes the stream. Also closes the underlying stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- upon error
-
mark
- Overrides:
markin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-