DomainIcon

data class DomainIcon(val rel: Relationship, val url: String, val sizes: String, val mimeType: String, val precomposed: Boolean, val length: Int) : Icon

Icon information associated with the Website domain.

e.g. Assuming that the URL of the site is https://www.example.com/index.html

When the file name is "apple-touch-icon-120x120-precomposed.png", the following values are stored

rel=ICON
url=https://www.example.com/favicon.ico
sizes=120x120
mimeType=image/x-icon <- Content-Type value of the response from the server
precomposed=false
length=99999 <- Content-Length value of the response from the server

When the file name is "favicon.con", the following values are stored

rel=ICON
url=https://www.example.com/favicon.ico
sizes= <- empty
mimeType=image/x-icon <- Content-Type value of the response from the server
precomposed=false
length=99999 <- Content-Length value of the response from the server

Constructors

Link copied to clipboard
constructor(rel: Relationship, url: String, sizes: String, mimeType: String, precomposed: Boolean, length: Int)

Properties

Link copied to clipboard
open override val length: Int

Icon file length.

Link copied to clipboard
open override val mimeType: String

Icon MIME type. e.g. "image/png"

Link copied to clipboard
open override val precomposed: Boolean

true if this is for a precomposed touch icon.

Link copied to clipboard
open override val rel: Relationship

Relationship between icon and page.

Link copied to clipboard
open override val sizes: String

Size information, assumed format is (width)x(height). e.g. "80x80".

Link copied to clipboard
open override val url: String

Icon url.

Functions

Link copied to clipboard
open fun inferArea(): Int

Infer area of this icon.

Link copied to clipboard
open override fun inferSize(): Size

Infer display size of this icon from sizes value.