Reader

interface Reader

Provides an interface for reading data from the attachment

Functions

Link copied to clipboard
abstract fun close()

Close the reader

Link copied to clipboard
abstract fun isClosed(): Boolean

Check whether closed or not

Link copied to clipboard
abstract fun read(    byteBuffer: ByteBuffer,     offsetInBytes: Int,     sizeInBytes: Int): Int
abstract fun read(    bytes: ByteArray,     offsetInBytes: Int,     sizeInBytes: Int): Int

Read bytes from attachment

Link copied to clipboard
abstract fun readChunk(): ByteBuffer?

Read chunk buffer from attachment. The next call will return next chunk. This is independent of other read api.