FileName:要获取Hash值的文件名
Type_:获取对应的Hash值.1、表示MD5;2、SHA1;3、SHA256;4、SHA384;5、SHA512;6、RIPEMD160
请参考:http://blog.163.com/shikang999@126/blog/static/17262489620130721423811/
当hashMap的key是多个字段 且想得到多个value时 可能将key和 value分别做成List
view plaincopy to clipboardprint? import java util Map
//inquiry result List fromDetailList = instHdDao retrieveInstInfoByView(sysOwnerCd fromCd instruct)
// Initial Value Integer dtTotalTruck = Integer dtTotalQuantity =
Map hm = new HashMap()
Iterator it = erator() while(it hasNext()){ MeInstHd meInstHd = (MeInstHd)it next()
List arr = new ArrayList() List arr = new ArrayList() List arr = new ArrayList()
String carrierCd = meInstHd getCarrCd() trim()
arr add(carrierCd)// put keyValue to Arr
if(ntainsKey(arr )){ // carrierCd is exist in hm arr = (ArrayList)hm get(arr )// 通过Key arr 取得arr 的Value arr List arr 中有2列值 他们分别是dtTotalQuantity 和dtTotalTruck
dtTotalQuantity = (Integer)arr get( ) dtTotalQuantity += meInstHd sumInstructQty() dtTotalTruck = (Integer)arr get( ) dtTotalTruck +=
arr add(dtTotalQuantity) arr add(dtTotalTruck)
hm put(arr arr )// creat hashMap hm } else{ // carrierCd is not exist in hm arr add(meInstHd sumInstructQty())//put value to arr arr add( )// dtTotalTruck initial value is
lishixinzhi/Article/program/Java/hx/201311/27090
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)