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`

public class WindowsLineEndingInputStream extends InputStream
A filtering input stream that ensures the content will have Windows line endings, CRLF.

Since:
  2.5

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WindowsLineEndingInputStream(InputStream in, boolean lineFeedAtEos)`
  Constructs an input stream that filters another stream.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes the stream.
  `void`
  `mark(int readLimit)`
  `int`
  `read()`

  ### Methods inherited from class java.io.InputStream

  `available, markSupported, read, read, reset, skip`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### WindowsLineEndingInputStream

    public WindowsLineEndingInputStream(InputStream in, boolean lineFeedAtEos)
    Constructs an input stream that filters another stream.
    Parameters:
      `in` - The input stream to wrap.
      `lineFeedAtEos` - true to ensure that the stream ends with CRLF.

- ## Method Details

  - ### close

    public void close() throws IOException
    Closes the stream. Also closes the underlying stream.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Overrides:
      `close` in class `InputStream`
    Throws:
      `IOException` - upon error

  - ### mark

    public void mark(int readLimit)
    Overrides:
      `mark` in class `InputStream`

  - ### read

    public int read() throws IOException
    Specified by:
      `read` in class `InputStream`
    Throws:
      `IOException`