RealBufferedSink class

Implemented types
Available Extensions

Constructors

RealBufferedSink(Sink sink)

Properties

buffer Buffer
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Pushes all buffered bytes to their final destination and releases the resources held by this sink. It is an error to write a closed sink. It is safe to close a sink more than once.
override
emit() Future<void>
Writes all buffered data to the underlying sink, if one exists. Like flush, but weaker. Call this before this buffered sink goes out of scope so that its data can reach its destination.
override
emitCompleteSegments() Future<void>
Writes complete segments to the underlying sink, if one exists. Like flush, but weaker. Use this to limit the memory held in the buffer to a single segment. Typically application code will not need to call this: it is only necessary when application code writes directly to this sink's buffer.
override
flush() Future<void>
Pushes all buffered bytes to their final destination.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
write(Buffer source, int count) Future<void>
Removes count bytes from source and appends them to this.
override
writeCharCode(int charCode) Future<void>
Writes the character represented by charCode.
override
writeFloat32(double value, [Endian endian = Endian.big]) Future<void>
Writes four bytes to this sink.
override
writeFloat64(double value, [Endian endian = Endian.big]) Future<void>
Writes eight bytes to this sink.
override
writeFromBytes(List<int> source, [int start = 0, int? end]) Future<void>
This writes byteCount bytes of source, starting at start.
override
writeFromSource(Source source) Future<int>
Removes all bytes from source and appends them to this sink. Returns the number of bytes read which will be 0 if source is exhausted.
override
writeInt16(int value, [Endian endian = Endian.big]) Future<void>
Writes two bytes to this sink.
override
writeInt32(int value, [Endian endian = Endian.big]) Future<void>
Writes four bytes to this sink.
override
writeInt64(int value, [Endian endian = Endian.big]) Future<void>
Writes eight bytes to this sink.
override
writeInt8(int value) Future<void>
Writes a byte to this sink.
override
writeLine([String string = '', Encoding encoding = utf8]) Future<void>
Writes string followed by a newline, "\n".
override
writeString(String string, [Encoding encoding = utf8]) Future<void>
Encodes string in encoding and writes it to this sink.
override
writeUint16(int value, [Endian endian = Endian.big]) Future<void>
Writes two bytes to this sink.
override
writeUint32(int value, [Endian endian = Endian.big]) Future<void>
Writes four bytes to this sink.
override
writeUint64(int value, [Endian endian = Endian.big]) Future<void>
Writes eight bytes to this sink.
override
writeUint8(int value) Future<void>
Writes a byte to this sink.
override

Operators

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