FlushingIOSink class

A wrapper around an IOSink that ensures that all data is flushed before the IOSink is closed. This is needed when an IOSink is being used with an API obeying the Sink contract, which includes close but not flush.

Implemented types

Constructors

FlushingIOSink(IOSink _dest)

Properties

done Future<void>
Get a future that will complete the previous close operation has completed. It is an error if close has not been called; in this case, the results are undefined.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(List<int> data) → void
Adds data to the sink.
override
close() Future<void>
Flush all pending data from the underlying IOSink, and close it. Returns a future that completes when the flush and close are finished. Calling this method more than once has no effect. See also done.
override
flush() Future<void>
Flush all pending data from the underlying IOSink. Returns a Future that completes when the flush is finished. See IOSink.flush.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited