sS md5OfStream(InputStream in) ctex { if (in == null) ret "-"; temp in; MessageDigest md5 = MessageDigest.getInstance("MD5"); byte[] buf = new[65536]; int l; while (true) { l = in.read(buf); if (l <= 0) break; md5.update(buf, 0, l); } ret bytesToHex(md5.digest()); }