DataStream class abstract

An interface providing (optionally random) access to a stream of data. Note: this is not a stream in the Dart sense, but a stream of bytes.

Implementers

Constructors

DataStream()

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
The total length of the data.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read({int? start, int? length}) Future<Stream<List<int>>>
Reads from start offset a maximum amount of length bytes. If start is null, then starts from the beginning of the data. If length is null, then reads up to the end.
readData({int? start, int? length}) Future<List<int>>
Read the bytes as a data buffer.
readText({Encoding encoding = utf8}) Future<String>
Returns the data as text contents, decoded with the given encoding (defaults is UTF-8).
readXml() Future<XmlDocument>
Returns the data parsed as a XmlDocument.
readXmlDocument() Future<XmlDocument>
toString() String
A string representation of this object.
inherited
validateRange(int? start, int? length) List<int>
Validates the given start and length range components and return them (or the default ones if null). Throws an exception if the range is not valid.

Operators

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