Class FAFile.CREatingInputStream

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

    private static class FAFile.CREatingInputStream
    extends java.io.InputStream
    This utility class removes all CR:s from an InputStream. It is not particularly efficient and is intended as a temporary workaround.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.InputStream in  
    • Constructor Summary

      Constructors 
      Constructor Description
      CREatingInputStream​(java.io.InputStream in)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read()
      Read a character, override to eat all CR:s.
      • Methods inherited from class java.io.InputStream

        available, close, mark, 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

      • in

        private final java.io.InputStream in
    • Constructor Detail

      • CREatingInputStream

        CREatingInputStream​(java.io.InputStream in)
        Constructor.
        Parameters:
        in - The input stream to wrap.
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Read a character, override to eat all CR:s.
        Specified by:
        read in class java.io.InputStream
        Returns:
        next character or -1 on end of file.
        Throws:
        java.io.IOException - if wrapped stream throws it.