Package org.apache.commons.io.input
Class UnixLineEndingInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.io.input.UnixLineEndingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
A filtering input stream that ensures the content will have UNIX-style line endings, LF.
- Since:
- 2.5
-
Constructor Summary
ConstructorDescriptionUnixLineEndingInputStream
(InputStream inputStream, 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
-
UnixLineEndingInputStream
Constructs an input stream that filters another stream- Parameters:
inputStream
- The input stream to wrapensureLineFeedAtEndOfFile
- true to ensure that the file ends with LF
-
-
Method Details
-
close
Closes the stream. Also closes the underlying stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- upon error
-
mark
- Overrides:
mark
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-