NonRDFResource

A non-RDF source: a "binary" resource handled as an opaque byte stream.

Use this for content that is not RDF — images, PDFs, plain text, and so on. Unlike RDFResource, it carries no triple model; its body is exposed verbatim through getEntity and described only by its getContentType.

For resources fetched from a Solid server, prefer the SolidNonRDFResource subtype, which also exposes the response SolidMetadata. Use this base type for binary content you construct locally before writing it to a pod.

The backing stream is consumed when the body is read or the resource is parcelled, so an instance is single-use; close it (or read it) exactly once.

Parcelling buffers the entire body as raw bytes, so binary content survives IPC unchanged. Android's binder transaction buffer is roughly 1 MB per process; sending a larger body over AIDL fails with a TransactionTooLargeException.

See the Solid Protocol (https://solidproject.org/TR/protocol) and LDP (http://www.w3.org/TR/ldp/) for the non-RDF source model.

Inheritors

Constructors

Link copied to clipboard
constructor(identifier: String, contentType: String, headers: SolidHeaders?, entity: InputStream)
constructor(identifier: String, contentType: String, entity: InputStream)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open override fun getContentType(): String

The media type of the resource representation (the value of its Content-Type).

Link copied to clipboard
open override fun getEntity(): InputStream

Returns the resource representation as a byte stream.

Link copied to clipboard
open override fun getHeaders(): SolidHeaders

The HTTP headers associated with this resource (empty when constructed locally).

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

The URI that identifies this resource on the pod.

Link copied to clipboard
open override fun writeToParcel(dest: Parcel, flags: Int)