Class RereadableContent.RrcInputStream

All Implemented Interfaces:
Attributable, Closeable, AutoCloseable
Enclosing class:
RereadableContent

protected static class RereadableContent.RrcInputStream extends AttributedInputStream
This class is an input stream that also provides the RereadableContent it has been created for. This allows to easily reuse the RereadableContent without copying its data.
  • Constructor Details

    • RrcInputStream

      public RrcInputStream(InputStream is, RereadableContent rrc, CleanupTask<IOException> cleanup)
      Creates a new input stream with the designated input stream as content and wrapping the designated RereadableContent.
      Parameters:
      is - The content of the RereadableContent
      rrc - The wrapped RereadableContent that created this input stream.
      cleanup - An additional clean-up task for the created instance.