TempFileWritingStrategy

A WritingStrategy that writes to a temporary file and writes to the [ ] only when all data was written.

Creates a new TempFileWritingStrategy.

Parameters

tempFile

The file to write to, this will be deleted once the write operation is done.

Constructors

Link copied to clipboard
constructor(context: Context)
constructor(tempFile: File)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun finishWriting()

Called by the OutputStreamAdapter once the last byte was written. You should clear your reference to the OutputStreamAdapter at this time.

Link copied to clipboard
open override fun prepare(adapter: OutputStreamAdapter)

Called by the OutputStreamAdapter before the first byte is written.

Link copied to clipboard
open override fun write(data: ByteArray)

Called by the OutputStreamAdapter with the data that should be written.