Module io.smallrye.common.process
Package io.smallrye.common.process
Interface ProcessBuilder.Input<O>
- Type Parameters:
O- the output type
- All Superinterfaces:
PipelineBuilder<O>,ProcessBuilder<O>
- Enclosing interface:
ProcessBuilder<O>
The input handling aspect of the process builder.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.common.process.PipelineBuilder
PipelineBuilder.Error<O>, PipelineBuilder.Output<O>Nested classes/interfaces inherited from interface io.smallrye.common.process.ProcessBuilder
ProcessBuilder.Input<O> -
Field Summary
Fields inherited from interface io.smallrye.common.process.ProcessBuilder
DEFAULT_HARD_TIMEOUT, DEFAULT_SOFT_TIMEOUT -
Method Summary
Modifier and TypeMethodDescriptionSet the character set to use for input handling.empty()Instruct the builder to provide no input to the process being built.default ProcessBuilder.Input<O> fromString(String string) Use the given string as the input for the process being built.default ProcessBuilder.Input<O> fromStrings(Collection<?> strings) Use the given strings as the input for the process being built.Instruct the builder to inherit the input of the current process into the process being built.default ProcessBuilder.Input<O> Instruct the builder to use the native character set for input handling.produceBytesWith(io.smallrye.common.function.ExceptionConsumer<OutputStream, IOException> consumer) Instruct the builder to produce the process input using the given stream consumer.produceWith(io.smallrye.common.function.ExceptionConsumer<Writer, IOException> consumer) Instruct the builder to produce the process input using the given writer consumer.default ProcessBuilder.Input<O> transferFrom(InputStream stream) Instruct the builder to transfer the given stream's contents to the input of the process.default ProcessBuilder.Input<O> transferFrom(Reader reader) Instruct the builder to transfer the given reader's contents to the input of the process.transferFrom(Path path) Instruct the builder to transfer the entire contents of the file at the given path to the input of the process.Methods inherited from interface io.smallrye.common.process.PipelineBuilder
error, output, run, runAsyncMethods inherited from interface io.smallrye.common.process.ProcessBuilder
arguments, arguments, directory, environment, exitCodeChecker, hardExitTimeout, input, modifyEnvironment, softExitTimeout, specialQuoting, whileRunning
-
Method Details
-
empty
ProcessBuilder.Input<O> empty()Instruct the builder to provide no input to the process being built.- Returns:
- this builder
-
inherited
ProcessBuilder.Input<O> inherited()Instruct the builder to inherit the input of the current process into the process being built.- Returns:
- this builder
-
charset
Set the character set to use for input handling.- Parameters:
charset- the character set (must not benull)- Returns:
- this builder
-
nativeCharset
Instruct the builder to use the native character set for input handling.- Returns:
- this builder
-
fromString
Use the given string as the input for the process being built.- Parameters:
string- the string (must not benull)- Returns:
- this builder
-
fromStrings
Use the given strings as the input for the process being built. Each entry in the collection is converted to a string usingString.valueOf(Object)and written on its own line.- Parameters:
strings- the strings (must not benull)- Returns:
- this builder
-
transferFrom
Instruct the builder to transfer the given stream's contents to the input of the process. The stream is not closed. The character set is not used for this input mode.- Parameters:
stream- the stream to transfer from (must not benull)- Returns:
- this builder
-
transferFrom
Instruct the builder to transfer the given reader's contents to the input of the process. The reader is not closed.- Parameters:
reader- the reader to transfer from (must not benull)- Returns:
- this builder
-
transferFrom
Instruct the builder to transfer the entire contents of the file at the given path to the input of the process. The character set is not used for this input mode.- Parameters:
path- the path to transfer from (must not benull)- Returns:
- this builder
-
produceBytesWith
ProcessBuilder.Input<O> produceBytesWith(io.smallrye.common.function.ExceptionConsumer<OutputStream, IOException> consumer) Instruct the builder to produce the process input using the given stream consumer. The character set is not used for this input mode.- Parameters:
consumer- the stream consumer (must not benull)- Returns:
- this builder
-
produceWith
ProcessBuilder.Input<O> produceWith(io.smallrye.common.function.ExceptionConsumer<Writer, IOException> consumer) Instruct the builder to produce the process input using the given writer consumer.- Parameters:
consumer- the writer consumer (must not benull)- Returns:
- this builder
-