addPadding static method
Implementation
static void addPadding(List<int> data, int requiredSize) {
if (data.length < requiredSize) {
// add padding to complete the mtu
var add = requiredSize - data.length;
for (int i = 0; i < add; i++) {
data.add(0);
}
}
}