protected long getChecksumStream(InputStream in) throws ClassNotFoundException,
          InstantiationException, IllegalAccessException, IOException {
    CheckedInputStream cis = new CheckedInputStream(in, createChecksumObject());
    byte[] buff = new byte[128];
    while (cis.read(buff) >= 0) {
    }
    return cis.getChecksum().getValue();
  }