Builder


class Builder
kotlin.Any
   ↳ android.app.contentsafety.ClassifiableContent.Builder

Builder for ClassifiableContent.

Summary

Public constructors
Builder(locusId: LocusId, mimeType: String)

Creates a new builder.

Public methods
ClassifiableContent

Builds the ClassifiableContent object.

ClassifiableContent.Builder

Sets the ParcelFileDescriptor containing the raw data of this content.

ClassifiableContent.Builder
setUri(uri: Uri)

Sets the Uri of the content.

Public constructors

Builder

Builder(
    locusId: LocusId,
    mimeType: String)

Creates a new builder.

Parameters
locusId LocusId: the LocusId to set.
This value cannot be null.
mimeType String: the MIME type of the content.
This value cannot be null.

Public methods

build

fun build(): ClassifiableContent

Builds the ClassifiableContent object.

Return
ClassifiableContent the built ClassifiableContent
This value cannot be null.

setData

fun setData(data: ParcelFileDescriptor): ClassifiableContent.Builder

Sets the ParcelFileDescriptor containing the raw data of this content.

Parameters
data ParcelFileDescriptor: the ParcelFileDescriptor to set.
This value cannot be null.
Return
ClassifiableContent.Builder this builder.
This value cannot be null.

setUri

fun setUri(uri: Uri): ClassifiableContent.Builder

Sets the Uri of the content.

Parameters
uri Uri: the Uri to set.
This value cannot be null.
Return
ClassifiableContent.Builder this builder.
This value cannot be null.