Class DataURLs.Builder.WithMediaType

  • Enclosing class:
    DataURLs.Builder

    public static final class DataURLs.Builder.WithMediaType
    extends java.lang.Object
    A class that can be used to build data URLs with media types.
    • Field Detail

      • mimeType

        private final java.lang.String mimeType
      • parameters

        private final java.util.Map<java.lang.String,​java.lang.String> parameters
    • Method Detail

      • withMediaTypeParameter

        public DataURLs.Builder.WithMediaType withMediaTypeParameter​(java.lang.String name,
                                                                     java.lang.String value)
        Sets the value for a media type parameter.
        Parameters:
        name - The parameter name.
        value - The parameter value. Use null to remove an existing parameter.
        Returns:
        This builder object.
      • build

        public java.net.URL build()
        Creates a new data URL.
        Returns:
        The created data URL.