public void write(OutputStream os) throws IOException { IOUtils.writeIntMM(os, (int) length); IOUtils.writeIntMM(os, chunkType.getValue()); IOUtils.write(os, data); IOUtils.writeIntMM(os, (int) crc); }
public boolean isValidCRC() { return (calculateCRC(chunkType.getValue(), data) == crc); }