newInstance

fun newInstance(data: ByteArray): ScatterMessage.Builder

creates a new Builder instance using an inline byte array without a file descriptor

Return

builder class

Parameters

data

payload for this message

fun newInstance(file: File): ScatterMessage.Builder

creates a new Builder instance using a file. Files are copied into the Scatterbrain datastore when this messsage is inserted

Return

builder class

Parameters

file

file for this message

fun newInstance(descriptor: FileDescriptor, ext: String, mime: String, name: String): ScatterMessage.Builder

creates a new Builder instance using a file. Files are copied into the Scatterbrain datastore when this messsage is inserted

Return

builder class

Parameters

descriptor

file for this message

ext

file extension

mime

mime type

name

filename for file