DataInputStream.readFromStreamOrDefault

Reads a value from the stream, or return a default value if reading fails for any reason.

struct DataInputStream(S)
T
readFromStreamOrDefault
(
T
)
(
T defaultValue = T.init
)

Parameters

defaultValue T

The default value to return if reading fails.

Return Value

Type: T

The value that was read, or a default value.

Meta