RamFileHandle class
- Inheritance
-
- Object
- AbstractFileHandle
- RamFileHandle
Constructors
- RamFileHandle.asWritableRamBuffer()
-
Creates a writeable RamFileHandle
factory
- RamFileHandle.fromRamFileData(RamFileData ramFileData)
-
Creates a read-only RamFileHandle from a RamFileData
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
True if the file is currently open.
no setteroverride
- length → int
-
The size of the file in bytes.
no setteroverride
- position ↔ int
-
The current read/write position pf the file.
getter/setter pairoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Close the file asynchronously.
override
-
closeSync(
) → void -
Close the file synchronously.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
{FileAccess mode = FileAccess.read}) → bool -
Open the file with the given
mode
, for either read or write.inherited -
readInto(
Uint8List buffer, [int? end]) → int -
Read from the file into the given
buffer
. Ifend
is omitted, it defaults tobuffer
.length.override -
toString(
) → String -
A string representation of this object.
inherited
-
writeFromSync(
List< int> buffer, [int start = 0, int? end]) → void -
Synchronously writes from a
buffer
to the file. Will read the buffer from indexstart
to indexend
. Thestart
must be non-negative and no greater thanbuffer
.length. Ifend
is omitted, it defaults tobuffer
.length. Otherwiseend
must be no less thanstart
and no greater thanbuffer
.length.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromStream(
Stream< Uint8List> stream, int fileLength) → Future<RamFileHandle> - Creates a read-only RamFileHandle from a stream