Class EolCanonicalizingInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class EolCanonicalizingInputStream
    extends InputStream
    An input stream which canonicalizes EOLs bytes on the fly to '\n'. Optionally, a binary check on the first 8000 bytes is performed and in case of binary files, canonicalization is turned off (for the complete file).
    • Constructor Detail

      • EolCanonicalizingInputStream

        public EolCanonicalizingInputStream​(InputStream in,
                                            boolean detectBinary)
        Creates a new InputStream, wrapping the specified stream
        Parameters:
        in - raw input stream
        detectBinary - whether binaries should be detected
        Since:
        2.0
      • EolCanonicalizingInputStream

        public EolCanonicalizingInputStream​(InputStream in,
                                            boolean detectBinary,
                                            boolean abortIfBinary)
        Creates a new InputStream, wrapping the specified stream
        Parameters:
        in - raw input stream
        detectBinary - whether binaries should be detected
        abortIfBinary - throw an IOException if the file is binary
        Since:
        3.3