ditto / live.ditto / DittoAttachment

DittoAttachment

class DittoAttachment : Closeable

Represents an attachment and can be used to insert the associated attachment into a document at a specific key.

Parameters

metadata - the attachment's metadata.

Properties

metadata

the attachment's metadata.

val metadata: Map<String, String>

Functions

close

fun close(): Unit

copyToPath

Copies the attachment to the specified file path.

fun copyToPath(path: String): Unit

finalize

fun finalize(): Unit

getData

Returns the attachment's data as a ByteArray.

fun getData(): ByteArray

getInputStream

Returns an input stream for the attachment file.

fun getInputStream(): FileInputStream