ReadbufferFile class

Reads chunks of a file from the disc. Supports reading multiple chunks concurrently (underlying RandomAccessFile forbids this).

Implemented types

Constructors

ReadbufferFile.new(String filename)

Properties

filename String
The filename of the underlying file
final
hashCode int
The hash code for this object.
no setterinherited
inputStream Stream<List<int>>
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
closes the underlying file
override
freeRessources() → void
frees the underlying files. This is meant to be used when sending to an isolate
override
getPosition() int
Returns the current position in the readbuffer source
override
length() Future<int>
returns the length of the file. If needed this method may be removed but the length check must be done in the individual read-methods then.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readFromFile(int length) Future<Readbuffer>
Reads the given amount of bytes from the file into the read buffer and resets the internal buffer position. If the capacity of the read buffer is too small, a larger one is created automatically.
override
readFromFileAt(int position, int length) Future<Readbuffer>
override
setPosition(int position) Future<void>
override
toString() String
A string representation of this object.
override

Operators

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