// Read the maxlen first - read 4 bytes here
byte[] lenBytes = new byte[MSG_LEN_SIZE];
input.read(lenBytes, 0, MSG_LEN_SIZE);
// Read the maxlen first - read 4 bytes here
byte[] lenBytes = new byte[MSG_LEN_SIZE];
input.read(lenBytes, 0, MSG_LEN_SIZE);