📄 md5cache.java
字号:
/******************************************************************************* * Copyright (C) 2002 ingenieurbuero fuer innovative informationstechnik (iiit) * Dipl.-Ing. Joerg Beckmann, Dortmund, Germany * * version $Id: Md5Cache.java,v 1.4 2003/04/13 20:16:42 joerg Exp $ ******************************************************************************/package de.iiit.access.server.util;import java.util.*;/** Global cache for MD5 sums * @version $Revision: 1.4 $ $Date: 2003/04/13 20:16:42 $ */public class Md5Cache{ /** CVS Version Tag */ private static final String vcid = "$Id: Md5Cache.java,v 1.4 2003/04/13 20:16:42 joerg Exp $"; private static final Hashtable cache = new Hashtable(); /** Creates a new instance of Md5Cache */ private Md5Cache() { } /** Puts a new value into the cache * @param key the string the MD5 sum is needed for. * @param md5sum the MD5 sum corresponding to the key */ public static void put(String key, String md5sum) { synchronized(cache) { cache.put(key, md5sum); } } /** Retrieves a previously stored MD5 sum * @param key the string the MD5 sum is needed for. * @return the MD5 sum corresponding to the key or null if there is none cached. */ public static String get(String key) { synchronized(cache) { return (String) cache.get(key); } } }/** * $Log: Md5Cache.java,v $ * Revision 1.4 2003/04/13 20:16:42 joerg * Package structure modified * * Revision 1.3 2003/01/31 20:10:45 joerg * Zugriff auf den Cache erfolgt jetzt synchronized. * * Revision 1.2 2003/01/29 20:37:07 joerg * JavaDoc-Kommentare eingefuegt. * * Revision 1.1 2003/01/29 20:31:09 joerg * Neue Klasse zum Cachen von MD5-Summen * */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -