FeedInput

class FeedInput(document: ByteArray, val contentType: String?, val baseUrl: Url?)(source)

One document for a FeedParser. Stable Core. The bytes are copied in and read back as copies. toString() prints the document's size, whether a content type is present and the base URL as scheme, host and port; never the content, the content type's value or a path.

Parameters

document

the response body as received.

contentType

the response's Content-Type header value, or null.

baseUrl

the URL the document came from, the base for relative links, or null.

Constructors

Link copied to clipboard
constructor(document: ByteArray, contentType: String?, baseUrl: Url?)

Properties

Link copied to clipboard
val baseUrl: Url?

The URL the document came from, the base for relative links, or null.

Link copied to clipboard

The response's Content-Type header value, or null.

Link copied to clipboard

The document's size in bytes.

Functions

Link copied to clipboard

Returns the document.

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

A diagnostic string for logs: the document's size, whether a content type is present and the baseUrl as scheme, host and port, never the content, the content type's value or a path. Its format is not part of the API and may change.