Class WindowsLineFeedInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    class WindowsLineFeedInputStream
    extends java.io.InputStream
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowsLineFeedInputStream​(java.io.InputStream in, boolean ensureLineFeedAtEndOfFile)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      private int eofGame()  
      void mark​(int readlimit)  
      int read()  
      private int readWithUpdate()  
      • Methods inherited from class java.io.InputStream

        available, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • target

        private final java.io.InputStream target
      • ensureLineFeedAtEndOfFile

        private final boolean ensureLineFeedAtEndOfFile
      • slashRSeen

        private boolean slashRSeen
      • slashNSeen

        private boolean slashNSeen
      • injectSlashN

        private boolean injectSlashN
      • eofSeen

        private boolean eofSeen
    • Constructor Detail

      • WindowsLineFeedInputStream

        WindowsLineFeedInputStream​(java.io.InputStream in,
                                   boolean ensureLineFeedAtEndOfFile)
    • Method Detail

      • readWithUpdate

        private int readWithUpdate()
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • eofGame

        private int eofGame()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • mark

        public void mark​(int readlimit)
        Overrides:
        mark in class java.io.InputStream