Interface ProcessBuilder.Input<O>

Type Parameters:
O - the output type
All Superinterfaces:
PipelineBuilder<O>, ProcessBuilder<O>
Enclosing interface:
ProcessBuilder<O>

public static sealed interface ProcessBuilder.Input<O> extends ProcessBuilder<O>
The input handling aspect of the process builder.
  • Method Details

    • 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

      ProcessBuilder.Input<O> charset(Charset charset)
      Set the character set to use for input handling.
      Parameters:
      charset - the character set (must not be null)
      Returns:
      this builder
    • nativeCharset

      default ProcessBuilder.Input<O> nativeCharset()
      Instruct the builder to use the native character set for input handling.
      Returns:
      this builder
    • fromString

      default ProcessBuilder.Input<O> fromString(String string)
      Use the given string as the input for the process being built.
      Parameters:
      string - the string (must not be null)
      Returns:
      this builder
    • fromStrings

      default ProcessBuilder.Input<O> fromStrings(Collection<?> strings)
      Use the given strings as the input for the process being built. Each entry in the collection is converted to a string using String.valueOf(Object) and written on its own line.
      Parameters:
      strings - the strings (must not be null)
      Returns:
      this builder
    • transferFrom

      default ProcessBuilder.Input<O> transferFrom(InputStream stream)
      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 be null)
      Returns:
      this builder
    • transferFrom

      default ProcessBuilder.Input<O> transferFrom(Reader reader)
      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 be null)
      Returns:
      this builder
    • transferFrom

      ProcessBuilder.Input<O> transferFrom(Path path)
      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 be null)
      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 be null)
      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 be null)
      Returns:
      this builder