Class AutoLFInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class AutoLFInputStream
    extends InputStream
    An InputStream that normalizes CRLF to LF.

    Existing single CR are not changed to LF but are retained as is.

    Optionally, a binary check on the first RawText.getBufferSize() bytes is performed and in case of binary files, canonicalization is turned off (for the complete file). If binary checking determines that the input is CR/LF-delimited text and the stream has been created for checkout, canonicalization is also turned off.