Object -
io
:
ReadableCharacterChannel
Represents a channel which could be used to read characters through a given ReadableByteChannel.
Constructor
__init
(ReadableByteChannel byteChannel, string charset)
- byteChannel ReadableByteChannel
- charset string
-
Character-Set which would be used to encode/decode given bytes to characters
Methods
Reads a given number of characters. This will attempt read up to numberOfChars
characters from the channel.
io:EofError
will return once channel reach to it end.
Parameters
- numberOfChars int
-
Number of characters which should be read
-
Return Type
(string | Error) Content which is read or
EofError
once channel reach to it end.Error
if any error occurred.
Reads a json from the given channel.
-
Return Type
(json | Error) Read json string or
Error
if any error occurred
Reads a XML from the given channel.
-
Return Type
(xml | Error) Read xml or
Error
if any error occurred