Class UtilObjectTests.ErrorInjector

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

    public static final class UtilObjectTests.ErrorInjector
    extends java.io.FilterInputStream
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorInjector​(java.io.InputStream in, boolean onClose)  
      ErrorInjector​(java.io.InputStream in, int after)  
      ErrorInjector​(java.io.InputStream in, int after, boolean onClose)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      int read()  
      int read​(byte[] buf)  
      int read​(byte[] buf, int offset, int length)  
      • Methods inherited from class java.io.FilterInputStream

        available, mark, markSupported, reset, skip
      • Methods inherited from class java.io.InputStream

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

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

      • ErrorInjector

        public ErrorInjector​(java.io.InputStream in,
                             boolean onClose)
      • ErrorInjector

        public ErrorInjector​(java.io.InputStream in,
                             int after)
      • ErrorInjector

        public ErrorInjector​(java.io.InputStream in,
                             int after,
                             boolean onClose)
    • Method Detail

      • read

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

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

        public int read​(byte[] buf,
                        int offset,
                        int length)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • 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.FilterInputStream
        Throws:
        java.io.IOException