/** * Set the chunk's data. This method has two side-effects. 1. It will set the length field to be * the length of the data array given. 2. It will set the CRC field to the computed CRC value of * the data array given. */ void setData(byte[] data) { setLength(data.length); System.arraycopy(data, 0, reference, DATA_OFFSET, data.length); setCRC(computeCRC()); }