java - Insert Values into MultivaluedMap in a loop -
i have next construction , want insert values map. if there tcp packet coming want insert ip address , packet numbers multivaluedmap '
public static multivaluedmap<string,integer> srcip_map; public static multivaluedmap<string,integer> destip_map; public static hashmap<integer,packetdata> alldata_map = new hashmap<integer,packetdata>();
count=0; while (true) { packet info = captor.getpacket(); if (info != null){ if(cap_packet instanceof tcppacket){ tcppacket tc = (tcppacket) cap_packet; mapstore.srcip_map.put(tc.src_ip, count); count++; } }
'
java hashmap jpcap
No comments:
Post a Comment