Object - io : WritableByteChannel
WritableByteChannel represents an output resource (i.e file). which could be used to sink bytes.
(byte content, int offset)returns int | Error
Sinks bytes from a given input/output resource. This operation will be asynchronous. Writing might return without writing all the content.
int|io:Error result = writableByteChannel.write(record, 0);
- content byte
Block of bytes, which should be written
- offset int
Offset, which should be kept when writing bytes.
Return Type(int | Error)
Number of bytes written or else