Class CircularInputStream

    • Constructor Summary

      Constructors 
      Constructor Description
      CircularInputStream​(byte[] repeatContent, long targetByteCount)
      Constructs an instance from the specified array of bytes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      void close()  
      int read()  
      • Methods inherited from class java.io.InputStream

        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
    • Constructor Detail

      • CircularInputStream

        public CircularInputStream​(byte[] repeatContent,
                                   long targetByteCount)
        Constructs an instance from the specified array of bytes.
        Parameters:
        repeatContent - Input buffer to be repeated this buffer is not copied.
        targetByteCount - How many bytes the read. A negative number means an infinite target count.
    • Method Detail

      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.InputStream
        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 AbstractInputStream
        Throws:
        java.io.IOException
      • read

        public int read()
        Specified by:
        read in class java.io.InputStream