while ((count = fis.read(buffer)) != -1) {
md.update(buffer, 0, count);
sw.writeBinary(buffer, 0, count);
}
fis.close();
sw.writeEndElement(); // file
sw.writeStartElement("checksum");
sw.writeBinaryAttribute("", "", "value", md.digest());
sw.writeEndElement(); // checksum
}
sw.writeEndElement(); // files