- int end = start + this.getHeaderSize() / NetUtils.NumBitsInAByte
- + rawPayload.length;
- int checksumStartByte = start + getfieldOffset(CHECKSUM)
- / NetUtils.NumBitsInAByte;
+ int end = start + this.getHeaderSize() / NetUtils.NumBitsInAByte;
+ if (rawPayload != null) {
+ end += rawPayload.length;
+ }
+ int checksumStartByte = start + getfieldOffset(CHECKSUM) / NetUtils.NumBitsInAByte;