Package org.apache.commons.io.input
Class AbstractLineEndingInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.io.input.AbstractLineEndingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
UnixLineEndingInputStream,WindowsLineEndingInputStream
Abstracts
UnixLineEndingInputStream and WindowsLineEndingInputStream to reduce duplication.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) boolean(package private) boolean(package private) final InputStream(package private) final boolean -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLineEndingInputStream(InputStream inputStream, boolean lineFeedAtEos) Constructs an input stream that filters another stream -
Method Summary
Methods inherited from class java.io.InputStream
available, markSupported, read, read, read, reset, skip
-
Field Details
-
atEos
boolean atEos -
atSlashCr
boolean atSlashCr -
atSlashLf
boolean atSlashLf -
in
-
lineFeedAtEos
final boolean lineFeedAtEos
-
-
Constructor Details
-
AbstractLineEndingInputStream
AbstractLineEndingInputStream(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 Details
-
close
Closes the stream. Also closes the underlying stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- If an I/O error occurs.
-
mark
public void mark(int readLimit) - Overrides:
markin classInputStream
-