Author: j16sdiz
Date: 2008-12-14 13:35:16 +0000 (Sun, 14 Dec 2008)
New Revision: 24314
Modified:
trunk/plugins/XMLSpider/XMLSpider.java
Log:
oops, shouldn't have committed this
Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java 2008-12-14 13:29:53 UTC (rev
24313)
+++ trunk/plugins/XMLSpider/XMLSpider.java 2008-12-14 13:35:16 UTC (rev
24314)
@@ -133,21 +133,6 @@
}
}
- static class Term {
- /** MD5 of the term */
- String md5;
- /** Term */
- String word;
-
- public Term(String word) {
- this.word = word;
- md5 = MD5(word);
- }
-
- public Term() {
- }
- }
-
/** Document ID of fetching documents */
protected Map<Page, ClientGetter> runningFetch = new HashMap<Page,
ClientGetter>();
@@ -812,19 +797,14 @@
/*
* calculate the md5 for a given string
*/
- private static String MD5(String text) {
- try {
- MessageDigest md = MessageDigest.getInstance("MD5");
- byte[] md5hash = new byte[32];
- byte[] b = text.getBytes("UTF-8");
- md.update(b, 0, b.length);
- md5hash = md.digest();
- return convertToHex(md5hash);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException("UTF-8 not supported", e);
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException("MD5 not supported", e);
- }
+ private static String MD5(String text) throws NoSuchAlgorithmException,
UnsupportedEncodingException {
+ MessageDigest md;
+ md = MessageDigest.getInstance("MD5");
+ byte[] md5hash = new byte[32];
+ byte[] b = text.getBytes("UTF-8");
+ md.update(b, 0, b.length);
+ md5hash = md.digest();
+ return convertToHex(md5hash);
}
public void generateSubIndex(String filename){
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs