Class MediaFile.Builder<B extends MediaFile.Builder<B>>

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

public static class MediaFile.Builder<B extends MediaFile.Builder<B>> extends MediaStream.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 MediaFile build()
      Finish building the MediaFile object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to MediaFile.
      Overrides:
      build in class MediaStream.Builder<B extends MediaFile.Builder<B>>
      Returns:
      a new instance of MediaFile with the properties that were set in the Builder object.
    • setFile

      public B setFile(File file)
      The file being played back or null if not playing a file.
      Parameters:
      file - the value for the file property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setInputStream

      public B setInputStream(InputStream inputStream)

      The stream being played back or null if not playing a stream.

      This is null when playing a file.

      Parameters:
      inputStream - the value for the input-stream property
      Returns:
      the Builder instance is returned, to allow method chaining