ResourceHandle class Null safety
A wrappper around OS resource handle so it can be passed via Socket as part of SocketMessage.
Constructors
- ResourceHandle.fromFile(RandomAccessFile file)
-
Creates wrapper around opened file.
factory
- ResourceHandle.fromRawDatagramSocket(RawDatagramSocket socket)
-
Creates wrapper around opened raw datagram socket.
factory
- ResourceHandle.fromRawSocket(RawSocket socket)
-
Creates wrapper around opened raw socket.
factory
- ResourceHandle.fromReadPipe(ReadPipe pipe)
-
factory
- ResourceHandle.fromSocket(Socket socket)
-
Creates wrapper around opened socket.
factory
- ResourceHandle.fromStdin(Stdin stdin)
-
Creates wrapper around current stdin.
factory
- ResourceHandle.fromStdout(Stdout stdout)
-
Creates wrapper around current stdout.
factory
- ResourceHandle.fromWritePipe(WritePipe pipe)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toFile(
) → RandomAccessFile - Extracts opened file from resource handle.
-
toRawDatagramSocket(
) → RawDatagramSocket - Extracts opened raw datagram socket from resource handle.
-
toRawSocket(
) → RawSocket - Extracts opened raw socket from resource handle.
-
toReadPipe(
) → ReadPipe - Extracts a read pipe from resource handle.
-
toSocket(
) → Socket - Extracts opened socket from resource handle.
-
toString(
) → String -
A string representation of this object.
inherited
-
toWritePipe(
) → WritePipe - Extracts a write pipe from resource handle.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited