writeBoolean

[ Function ]

public writeBoolean(value: boolean): this;

Encodes a Boolean value in a byte and appends it to the data. The value true is coded as a byte with the value 1, false with 0.

Parameter

Name

Type

Description

value

boolean

The value to be written

Return value

Type

Description

Base64BinaryWriter

This method returns its parent object to allow concatenation of method calls.

Sample - JavaScript

var writer = new TcHmi.Base64BinaryWriter();
writer.writeBoolean(true).writeBoolean(false);
var result1 = writer.getEncodedString(); // 'AQA='
writeBoolean 1:

Available from version 1.10