Class WindowsLineEndingInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public class WindowsLineEndingInputStream extends AbstractLineEndingInputStream
A filtering input stream that ensures the content will have Windows line endings, CRLF.
Since:
2.5
  • Field Details

    • injectSlashLf

      private boolean injectSlashLf
  • 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

    • handleEos

      private int handleEos()
      Handles the end of stream condition.
      Returns:
      The next char to output to the stream.
    • read

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