Mitsubishi Electronics termostat QJ7MES96 Manual

Manuale PDF
474 Pagini Română

Mitsubishi Electronics termostat QJ7MES96
Pagini
DIN
474
9
- 6
9.2 XML Message Format Sending Method
9.2.2 Sample program
9
XML MESSAGE FORMAT
//Base64 encode
static String encodeBase64(String inStr) {
String refTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int rest = inStr.length()%3;
if ( rest != 0)
inStr += new String(new byte[] {0, 0, 0}).substring(rest);
byte[] inBuf = inStr.getBytes();
StringBuffer outStr = new StringBuffer();
for (int i = 0; i < inBuf.length; i+= 3) {
int tempBuf = inBuf[i]<<16 | inBuf[i+1]<<8 | inBuf[i+2];
for (int j = 18; j >= 0; j
-
= 6)
outStr.append(refTable.charAt((tempBuf >> j) & 0x3f));
}
if (rest != 0) {
outStr.delete(outStr.length() - 3 + rest, outStr.length());
outStr.append("===".substring(rest));
}
return new String(outStr);
}
}
(From the previous page)
Cuprins
Extinde tot
Manuale conexe pentru Mitsubishi Electronics termostat QJ7MES96