Enclosure

data class Enclosure(    var url: URL,     var length: Long,     var type: String)

<enclosure> is an optional sub-element of <item>.

It has three required attributes. url says where the enclosure is located, length says how big it is in bytes, and type says what its type is, a standard MIME type.

The url must be an http url.

<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />

A use-case narrative for this element is here.

Constructors

Link copied to clipboard
fun Enclosure(    url: URL,     length: Long,     type: String)

Properties

Link copied to clipboard
var length: Long

The length of the file to tbe downloaded.

Link copied to clipboard
var type: String

A mime type that indicates the type of file which should be downloaded.

Link copied to clipboard
var url: URL

The location of the file to be downloaded.

Sources

Link copied to clipboard