Class MockFileInputStream

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

    public class MockFileInputStream
    extends java.io.FileInputStream
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String KNOWN_FILE  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      void mark​(int readlimit)  
      static MockFileInputStream newMockFileInputStream()  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      void setupContents​(java.lang.String contents)  
      long skip​(long n)  
      • Methods inherited from class java.io.FileInputStream

        close, getChannel, getFD
      • Methods inherited from class java.io.InputStream

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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • mark

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

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • setupContents

        public void setupContents​(java.lang.String contents)
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FileInputStream
        Throws:
        java.io.IOException