final protected synchronized void set(boolean verifyChecksum,
      Checksum sum, int maxChunkSize, int checksumSize ) {
    this.verifyChecksum = verifyChecksum;
    this.sum = sum;
    this.buf = new byte[maxChunkSize];
    this.checksum = new byte[checksumSize];
    this.count = 0;
    this.pos = 0;
  }
final protected synchronized void set ( boolean verifyChecksum , Checksum sum , int maxChunkSize , int checksumSize ) { this . verifyChecksum = verifyChecksum ; this . sum = sum ; this . buf = new byte [ maxChunkSize ] ; this . checksum = new byte [ checksumSize ] ; this . count = 0 ; this . pos = 0 ; }
Set the checksum related parameters
@param verifyChecksum whether to verify checksum
@param sum which type of checksum to use
@param maxChunkSize maximun chunk size
@param checksumSize checksum size