Package nl.vpro.util
Class FileCachingInputStream.Builder
- java.lang.Object
-
- nl.vpro.util.FileCachingInputStream.Builder
-
- Enclosing class:
- FileCachingInputStream
public static class FileCachingInputStream.Builder extends Object
-
-
Method Summary
-
-
-
Method Detail
-
tempDir
public FileCachingInputStream.Builder tempDir(@Nullable URI uri)
Callspath
but with an uri argument
-
tempDir
public FileCachingInputStream.Builder tempDir(@Nullable String uri)
Callspath
but with a string argument
-
tempFile
public FileCachingInputStream.Builder tempFile(@Nullable Path path)
-
tempFile
public FileCachingInputStream.Builder tempFile(@Nullable File file)
-
noProgressLogging
public FileCachingInputStream.Builder noProgressLogging()
-
input
public FileCachingInputStream.Builder input(@NonNull InputStream input)
- Returns:
this
.
-
expectedCount
public FileCachingInputStream.Builder expectedCount(@Nullable Long expectedCount)
- Returns:
this
.
-
path
public FileCachingInputStream.Builder path(@Nullable Path path)
- Parameters:
path
- Directory for temporary files- Returns:
this
.
-
filePrefix
public FileCachingInputStream.Builder filePrefix(@Nullable String filePrefix)
- Returns:
this
.
-
batchSize
public FileCachingInputStream.Builder batchSize(long batchSize)
- Parameters:
batchSize
- Batch size- Returns:
this
.
-
batchConsumer
public FileCachingInputStream.Builder batchConsumer(@Nullable Consumer<FileCachingInputStream> batchConsumer)
- Parameters:
batchConsumer
- After reading every batch, you have the possibility to do something yourself too- Returns:
this
.
-
outputBuffer
public FileCachingInputStream.Builder outputBuffer(@Nullable Integer outputBuffer)
- Returns:
this
.
-
logger
public FileCachingInputStream.Builder logger(@Nullable org.slf4j.Logger logger)
- Parameters:
logger
- The logger to which possible logging will happen. Defaults to the logger of theFileCachingInputStream
class itself- Returns:
this
.
-
initialBuffer
public FileCachingInputStream.Builder initialBuffer(@Nullable Integer initialBuffer)
- Returns:
this
.
-
startImmediately
public FileCachingInputStream.Builder startImmediately(@Nullable Boolean startImmediately)
- Returns:
this
.
-
downloadFirst
public FileCachingInputStream.Builder downloadFirst(@Nullable Boolean downloadFirst)
- Parameters:
downloadFirst
- If true, then the entire inputstream will be consumed first (defaults to false)- Returns:
this
.
-
progressLogging
public FileCachingInputStream.Builder progressLogging(@Nullable Boolean progressLogging)
- Parameters:
progressLogging
- Whether progress logging must be done (every batch)- Returns:
this
.
-
progressLoggingBatch
public FileCachingInputStream.Builder progressLoggingBatch(@Nullable Integer progressLoggingBatch)
- Parameters:
progressLoggingBatch
- every this many batches a progress logging will be issued (unused progressLogging is explicitly false)- Returns:
this
.
-
tempPath
public FileCachingInputStream.Builder tempPath(@Nullable Path tempPath)
- Parameters:
tempPath
- Path to temporary file to use- Returns:
this
.
-
deleteTempFile
public FileCachingInputStream.Builder deleteTempFile(@Nullable Boolean deleteTempFile)
- Returns:
this
.
-
build
public FileCachingInputStream build()
-
-