Package nl.vpro.util
Class Copier.Builder
java.lang.Object
nl.vpro.util.Copier.Builder
- Enclosing class:
- Copier
-
Method Summary
Modifier and TypeMethodDescriptionbatchConsumer
(@Nullable Consumer<Copier> batchConsumer) build()
consumeSize
(Long consumeSize) errorHandler
(@Nullable BiConsumer<Copier, Throwable> errorHandler) executorService
(@Nullable ExecutorService executorService) expectedCount
(@Nullable Long expectedCount) input
(@NonNull InputStream input) offset
(int offset) output
(@NonNull OutputStream output) toString()
-
Method Details
-
input
- Parameters:
input
- The input stream to copy from (will be closed if ready)- Returns:
this
.
-
expectedCount
- Returns:
this
.
-
output
- Parameters:
output
- The output stream to copy to (will not be implicetely closed)- Returns:
this
.
-
batch
- Parameters:
batch
- The size of batches (defaults to 8192)- Returns:
this
.
-
batchConsumer
- Parameters:
batchConsumer
- Some action to perform after each batch- Returns:
this
.
-
consumeSize
- Returns:
this
.
-
callback
- Parameters:
callback
- Called when ready, this should probably close the outputstream- Returns:
this
.
-
errorHandler
- Parameters:
errorHandler
- Called on error, just before callback- Returns:
this
.
-
offset
- Parameters:
offset
- Just the initial value forCopier.getCount()
- Returns:
this
.
-
name
- Parameters:
name
- A name to assign to this copier- Returns:
this
.
-
notify
- Returns:
this
.
-
executorService
- Returns:
this
.
-
build
-
toString
-