public interface DuplicatableInputStream
Interface describing an InputStream that can safely be duplicated from its start and used in a thread-safe manner.
Add this to any class that extends InputStream
and can safely duplicate that stream.
Duplicate streams can be used, for example, when uploading objects to object storage to allow
for parallel uploads.
Modifier and Type | Method and Description |
---|---|
InputStream |
duplicate()
Produces a duplicate stream of the source (from its start) that can be used in parallel
to the original stream (ie, thread safe).
|
InputStream duplicate()
Produces a duplicate stream of the source (from its start) that can be used in parallel to the original stream (ie, thread safe).
Copyright © 2016–2022. All rights reserved.