Class LinuxLineFeedInputStream

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

    class LinuxLineFeedInputStream
    extends java.io.InputStream
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      private int eofGame​(boolean previousWasSlashR)  
      void mark​(int readlimit)  
      int read()  
      private int readWithUpdate()  
      • 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
    • Field Detail

      • target

        private final java.io.InputStream target
      • ensureLineFeedAtEndOfFile

        private final boolean ensureLineFeedAtEndOfFile
      • slashNSeen

        private boolean slashNSeen
      • slashRSeen

        private boolean slashRSeen
      • eofSeen

        private boolean eofSeen
    • Constructor Detail

      • LinuxLineFeedInputStream

        LinuxLineFeedInputStream​(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​(boolean previousWasSlashR)
      • 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