Hello,
I checked your last update on Teltonika protocol decoder and found this function:
private boolean isPrintable(ByteBuf buf, int length) {
boolean printable = true;
for (int i = 0; i < length; i++) {
byte b = buf.getByte(buf.readerIndex() + i);
if (b < 32 && b != '\r' && b != '\n') {
printable = false;
break;
}
}
return printable;
}
Could you please explain the purpose of this function?
thank you.
It checks if buffer contains a string value.
Hello,
I checked your last update on Teltonika protocol decoder and found this function:
private boolean isPrintable(ByteBuf buf, int length) { boolean printable = true; for (int i = 0; i < length; i++) { byte b = buf.getByte(buf.readerIndex() + i); if (b < 32 && b != '\r' && b != '\n') { printable = false; break; } } return printable; }
Could you please explain the purpose of this function?
thank you.