AssetFileBody

sealed class AssetFileBody

Content of an individual asset file

Inheritors

Types

Link copied to clipboard
data class Bytes(val value: ByteArray) : AssetFileBody

Binary file content

Link copied to clipboard
Link copied to clipboard
data class Text(val value: String) : AssetFileBody

Text file content

Functions

Link copied to clipboard

Casts this AssetFileBody as a Bytes and retrieves its kotlin.ByteArray value. Throws an exception if the AssetFileBody is not a Bytes.

Link copied to clipboard

Casts this AssetFileBody as a Bytes and retrieves its kotlin.ByteArray value. Returns null if the AssetFileBody is not a Bytes.

Link copied to clipboard
fun asText(): String

Casts this AssetFileBody as a Text and retrieves its kotlin.String value. Throws an exception if the AssetFileBody is not a Text.

Link copied to clipboard

Casts this AssetFileBody as a Text and retrieves its kotlin.String value. Returns null if the AssetFileBody is not a Text.