FileStream class
Random access stream to a file.
- Inheritance
-
- Object
- DataStream
- FileStream
Properties
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 oflength
bytes. Ifstart
is null, then starts from the beginning of the data. Iflength
is null, then reads up to the end.override -
readData(
{int? start, int? length}) → Future< List< int> > -
Read the bytes as a data buffer.
inherited
-
readText(
{Encoding encoding = utf8}) → Future< String> -
Returns the data as text contents, decoded with the given
encoding
(defaults is UTF-8).inherited -
readXml(
) → Future< XmlDocument> -
Returns the data parsed as a XmlDocument.
inherited
-
readXmlDocument(
) → Future< XmlDocument> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateRange(
int? start, int? length) → List< int> -
Validates the given
start
andlength
range components and return them (or the default ones if null). Throws an exception if the range is not valid.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromFile(
File file) → Future< FileStream>