Class TimeoutInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.eclipse.jgit.util.io.TimeoutInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class TimeoutInputStream extends FilterInputStream
InputStream with a configurable timeout.
  • Field Details

    • myTimer

      private final InterruptTimer myTimer
    • timeout

      private int timeout
  • Constructor Details

    • TimeoutInputStream

      public TimeoutInputStream(InputStream src, InterruptTimer timer)
      Wrap an input stream with a timeout on all read operations.
      Parameters:
      src - base input stream (to read from). The stream must be interruptible (most socket streams are).
      timer - timer to manage the timeouts during reads.
  • Method Details