Package org.apache.commons.io.input
Class AbstractLineEndingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.io.input.AbstractLineEndingInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
UnixLineEndingInputStream,WindowsLineEndingInputStream
abstract class AbstractLineEndingInputStream extends java.io.InputStreamAbstractsUnixLineEndingInputStreamandWindowsLineEndingInputStreamto reduce duplication.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanatEos(package private) booleanatSlashCr(package private) booleanatSlashLf(package private) java.io.InputStreamin(package private) booleanlineFeedAtEos
-
Constructor Summary
Constructors Constructor Description AbstractLineEndingInputStream(java.io.InputStream inputStream, boolean lineFeedAtEos)Constructs an input stream that filters another stream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the stream.voidmark(int readLimit)
-
-
-
Constructor Detail
-
AbstractLineEndingInputStream
AbstractLineEndingInputStream(java.io.InputStream inputStream, boolean lineFeedAtEos)Constructs an input stream that filters another stream- Parameters:
inputStream- The input stream to wrap.lineFeedAtEos- true to ensure that the file ends with LF.
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionCloses the stream. Also closes the underlying stream.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException- If an I/O error occurs.
-
mark
public void mark(int readLimit)
- Overrides:
markin classjava.io.InputStream
-
-