Companion

object Companion

Functions

Link copied to clipboard
fun fromBytes(name: String, data: ByteArray, mimeType: String? = null, id: String = UUID.randomUUID().toString(), timestamp: Instant = Instant.now(), description: String = "Asset "): MaterializableAsset

Create a serializable MaterializableAsset from in-memory bytes.

Link copied to clipboard
fun fromPath(path: Path, name: String = path.fileName?.toString() ?: path.toString(), mimeType: String? = null, id: String = UUID.randomUUID().toString(), timestamp: Instant = Instant.now(), description: String = "Asset "): MaterializableAsset

Create a serializable MaterializableAsset from a file system Path.

Link copied to clipboard
fun of(name: String, streamSupplier: () -> InputStream, mimeType: String? = null, id: String = UUID.randomUUID().toString(), timestamp: Instant = Instant.now(), description: String = "Asset "): MaterializableAsset

Create a transient MaterializableAsset from a stream supplier.