Object - io : WritableCharacterChannel
Represents a channel which could be used to write characters through a given WritableCharacterChannel.
(WritableByteChannel bChannel, string charset)
- bChannel WritableByteChannel
WritableByteChannel, which would be used to write the characters
- charset string
The character set, which would be used to encode the given bytes to characters
(string content, int startOffset)returns int | Error
Writes a given sequence of characters (string).
int|io:Error result = writableCharChannel.write("Content", 0);
- content string
Content, which should be written
- startOffset int
Number of characters, which should be offset when writing the content
Return Type(int | Error)
Content length that written or else
(json content)returns Error?
Writes a given JSON to the given channel.
io:Error? err = writableCharChannel.writeJson(inputJson, 0);
- content json
The JSON, which should be written
io:Erroroccurred while writing
(xml content)returns Error?
Writes a given XML to the channel.
io:Error? err = writableCharChannel.writeXml(inputXml, 0);
- content xml
The XML, which should be written
io:Errorif any error occurred