Read
Declaring type: StreamReader
Module: System.IO
Assembly: System.Runtime.dll
Source file: StreamReader.rvn
Overloads / Variants
Read
func Read(count: int, maxUtf8Bytes: int) -> Task<Result<string, TextReadError>>
Source file: StreamReader.rvn
Implements TextReader.Read
Reads a requested number of graphemes with a separate UTF-8 byte bound.
Parameters
| Name | Type | Description |
|---|---|---|
count |
Int32 | Grapheme count, from zero through 65536. |
maxUtf8Bytes |
Int32 | Maximum returned UTF-8 bytes, from zero through 65536. |
Return value
Task<Result<String, TextReadError>>
The requested text, a shorter remainder at EOF, or TextReadError.
Remarks
Zero count consumes nothing. Invalid bounds consume nothing. A result-limit error retains buffered text for retry; decoding/I/O errors do not rewind the source. Concurrent reads return Busy.
Read
func Read(count: int) -> Task<Result<string, TextReadError>>
Source file: StreamReader.rvn
Implements TextReader.Read
Reads a requested number of graphemes with a separate UTF-8 byte bound.
Parameters
| Name | Type | Description |
|---|---|---|
count |
Int32 | Grapheme count, from zero through 65536. |
Return value
Task<Result<String, TextReadError>>
The requested text, a shorter remainder at EOF, or TextReadError.
Remarks
Zero count consumes nothing. Invalid bounds consume nothing. A result-limit error retains buffered text for retry; decoding/I/O errors do not rewind the source. Concurrent reads return Busy.