Class TimeoutOutputStream

java.lang.Object
java.io.OutputStream
org.eclipse.jgit.util.io.TimeoutOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class TimeoutOutputStream extends OutputStream
OutputStream with a configurable timeout.
  • Field Details

  • Constructor Details

    • TimeoutOutputStream

      public TimeoutOutputStream(OutputStream destination, InterruptTimer timer)
      Wrap an output stream with a timeout on all write operations.
      Parameters:
      destination - base input stream (to write to). The stream must be interruptible (most socket streams are).
      timer - timer to manage the timeouts during writes.
  • Method Details