Class BufferedOutputStream.Builder<B extends BufferedOutputStream.Builder<B>>

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

public static class BufferedOutputStream.Builder<B extends BufferedOutputStream.Builder<B>> extends FilterOutputStream.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

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

    • build

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

      public B setAutoGrow(boolean autoGrow)
      Whether the buffer should automatically grow.
      Parameters:
      autoGrow - the value for the auto-grow property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setBufferSize

      public B setBufferSize(int bufferSize)
      The size of the backend buffer, in bytes.
      Parameters:
      bufferSize - the value for the buffer-size property
      Returns:
      the Builder instance is returned, to allow method chaining