Class Media.Location

  • Enclosing class:
    Media

    public static final class Media.Location
    extends Object
    Specifies the out-of-band location of the media data.

    This class is immutable.

    • Constructor Detail

      • Location

        public Location​(String type,
                        URI uri)
        Creates a media location.
        Parameters:
        type - The MIME type, see also getType()
        uri - The location of the media.
    • Method Detail

      • getUri

        public final URI getUri()
        Gets the URI.
        Returns:
        The URI.
      • getType

        public final String getType()
        Gets the MIME type of the media.

        2. Media Element

        The value of the 'type' attribute MUST match the syntax specified in RFC 2045 [5]. That is, the value MUST include a top-level media type, the "/" character, and a subtype; in addition, it MAY include one or more optional parameters (e.g., the "audio/ogg" MIME type in the example shown below includes a "codecs" parameter as specified in RFC 4281 [6]). The "type/subtype" string SHOULD be registered in the IANA MIME Media Types Registry [7], but MAY be an unregistered or yet-to-be-registered value.

        Returns:
        The type.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object