Object -
io :
ReadableByteChannel
ReadableByteChannel represents an input resource (i.e file, socket). which could be used to source bytes.
Methods
Source bytes from a given input/output resource.
Number of bytes returned will be < 0 if the file reached its end.
This operation will be asynchronous, where the total number of required bytes might not be returned at a given time.
Encodes a given ReadableByteChannel with Base64 encoding scheme.
Decodes a given ReadableByteChannel with Base64 encoding scheme.
Closes a given ReadableByteChannel.
Source bytes from a given input/output resource.
Number of bytes returned will be < 0 if the file reached its end.
This operation will be asynchronous, where the total number of required bytes might not be returned at a given time.
Parameters
- nBytes int
-
Positive integer. Represents the number of bytes which should be read
Encodes a given ReadableByteChannel with Base64 encoding scheme.
-
Return Type
(ReadableByteChannel | error) Return an encoded ReadableByteChannel or an error
Decodes a given ReadableByteChannel with Base64 encoding scheme.
-
Return Type
(ReadableByteChannel | error) Return a decoded ReadableByteChannel or an error