Object -
io
:
ReadableTextRecordChannel
Represents a channel which will allow to read
Constructor
__init
(ReadableCharacterChannel charChannel, string fs, string rs, string fmt)
- charChannel ReadableCharacterChannel
-
CharacterChannel which will point to the input/output resource
- fs string
-
Field separator (this could be a regex)
- rs string
-
Record separator (this could be a regex)
- fmt string default
Methods
Checks whether there's a record left to be read.
boolean hasNext = readableRecChannel.hasNext();
-
Return Type
(boolean) True if there's a record left to be read
Get the next record from the input/output resource.
string[]|io:Error record = readableRecChannel.getNext();
-
Return Type
(string[] | Error) Set of fields included in the record or else
io:Error