Class SimpleIOStream.Builder<B extends SimpleIOStream.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
SimpleIOStream

public static class SimpleIOStream.Builder<B extends SimpleIOStream.Builder<B>> extends IOStream.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
2.44
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public SimpleIOStream build()
      Finish building the SimpleIOStream object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to SimpleIOStream.
      Overrides:
      build in class IOStream.Builder<B extends SimpleIOStream.Builder<B>>
      Returns:
      a new instance of SimpleIOStream with the properties that were set in the Builder object.
    • setInputStream

      public B setInputStream(InputStream inputStream)
      The InputStream to read from.
      Parameters:
      inputStream - the value for the input-stream property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.44
    • setOutputStream

      public B setOutputStream(OutputStream outputStream)
      The OutputStream to write to.
      Parameters:
      outputStream - the value for the output-stream property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.44