FeedEnclosure

An enclosure of a feed entry: a media file the entry points at. Stable Core. Built with FeedEnclosure(url) { mimeType = …; lengthBytes = … }.

url is an absolute http or https link with its fragment kept. lengthBytes is the declared size when the feed gave a positive one, else null: a length of zero or less is unknown. Equality is on every field. toString() prints the URL as scheme, host and port, and presence for the rest.

Types

Link copied to clipboard

Collects the optional fields of a FeedEnclosure. Not thread-safe; use it only inside the factory's lambda.

Properties

Link copied to clipboard

The declared size in bytes, positive, or null when unknown.

Link copied to clipboard

The declared MIME type, or null.

Link copied to clipboard
val url: String

An absolute http or https link to the media file.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Two FeedEnclosures are equal when their url, mimeType and lengthBytes are equal.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code consistent with equals: it is computed from the same properties.

Link copied to clipboard
open override fun toString(): String

A diagnostic string for logs: the url as scheme, host and port, and whether mimeType and lengthBytes are present, never their values. Its format is not part of the API and may change.