Class NotifyingInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

class NotifyingInputStream extends CountingInputStream
Input stream which notifies a listener about its progress.
  • Field Details

    • UNKNOWN_CHUNK_SIZE

      static final int UNKNOWN_CHUNK_SIZE
      See Also:
    • MIN_CHUNK_SIZE

      static final int MIN_CHUNK_SIZE
      See Also:
    • MAX_NOTIFICATIONS

      static final int MAX_NOTIFICATIONS
      See Also:
    • downloadListener

      private final Consumer<Long> downloadListener
    • updateChunkSize

      private final long updateChunkSize
    • nextUpdateSize

      private long nextUpdateSize
  • Constructor Details

    • NotifyingInputStream

      public NotifyingInputStream(InputStream inputStream, long totalSize, Consumer<Long> downloadListener)
  • Method Details