OutputStreamSink

abstract class OutputStreamSink(coroutineContext: CoroutineContext = Dispatchers.IO) : AbstractSink

Sink to write data to an OutputStream

Inheritors

Constructors

Link copied to clipboard
constructor(coroutineContext: CoroutineContext = Dispatchers.IO)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val isOpenFlow: StateFlow<Boolean>

Whether if the endpoint is opened. For example, if the file is opened for FileSink.

Link copied to clipboard
open override val metrics: Any

Metrics of the sink.

Link copied to clipboard
protected var outputStream: OutputStream?
Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun close()

Closes and releases resources

Link copied to clipboard
open override fun configure(config: SinkConfiguration)

Configure the Configurable implementation.

Link copied to clipboard
open suspend override fun open(mediaDescriptor: MediaDescriptor)

Opens the endpoint.

Link copied to clipboard
open suspend override fun openImpl(mediaDescriptor: MediaDescriptor)
Link copied to clipboard
abstract suspend fun openOutputStream(mediaDescriptor: MediaDescriptor): OutputStream

Open an OutputStream to write data

Link copied to clipboard
open suspend override fun startStream()

Starts frames or data stream generation Throws an exception if not ready for live stream

Link copied to clipboard
open suspend override fun stopStream()

Stops frames or data stream generation

Link copied to clipboard
open suspend override fun write(packet: Packet): Int

Writes a buffer to the ISinkInternal.