IMessageBufferReader

interface IMessageBufferReader : Closeable

Exposes message data as a ByteBuffer for retrieval

Functions

Link copied to clipboard
abstract fun asBuffer(): ByteBuffer

Expose this message buffer as a read-only bytebuffer. If the message buffer is backed by a file, it will be mapped into memory

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
open fun write(to: FileChannel): Int

Write this message buffer to the provided file channel

Properties

Link copied to clipboard
abstract val size: Int

Size of the buffer

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
fun IMessageBufferReader.asInputStream(): InputStream
Link copied to clipboard
fun IMessageBufferReader.saveToAppStorage(file: File)

Save the message buffer to private storage

Link copied to clipboard
fun IMessageBufferReader.saveToSharedStorage(context: Context, location: Uri)

Save the message buffer to a file in a shared location