Bug in Java HashMap Code

已完成 已发布的 Nov 20, 2009 货到付款
已完成 货到付款

I have a bug in the following code.? It works the first time around but not the 2nd.? I think something is not? getting? cleared out.? I can send the entire package to the wining bidder.

The finished product will be? to resolve the bug.

? static HashMap<Integer, Integer> reassembledIn = new HashMap<Integer, Integer>();

? static HashMap<Integer, List<Integer>> reassemblyMap;

? static HashMap<Integer, byte[]> reassemblyFrameData = new HashMap<Integer, byte[]>();

if (reassemblyMap != null && [url removed, login to view](new Integer(FrameNum)) != null) {

? ? ? ? ? ? List<Integer> framesList = [url removed, login to view](new Integer(FrameNum));

? ? ? ? ? ? int total = 0;

? ? ? ? ? ? Iterator<Integer> it = [url removed, login to view]();

? ? ? ? ? ? while ([url removed, login to view]()) {

? ? ? ? ? ? ? Integer frame = [url removed, login to view]();

? ? ? ? ? ? ? byte[] frameData = [url removed, login to view](frame);

? ? ? ? ? ? ? total += [url removed, login to view];

? ? ? ? ? ? }

? ? ? ? ? ? PacketBuf = new byte[total];

? ? ? ? ? ? it = [url removed, login to view]();

? ? ? ? ? ? int pos = 0;

? ? ? ? ? ? while ([url removed, login to view]()) {

? ? ? ? ? ? ? Integer frame = [url removed, login to view]();

? ? ? ? ? ? ? byte[] frameData = [url removed, login to view](frame);

? ? ? ? ? ? ? [url removed, login to view](frameData, 0, PacketBuf, pos, [url removed, login to view]);

? ? ? ? ? ? ? pos += [url removed, login to view];

? ? ? ? ? ? }

? ? ? ? ? ? start_offs = 0;

? ? ? ? ? ? [url removed, login to view]("Reassembled Frames on Frame " + FrameNum + ": " + framesList).append([url removed, login to view]);

? ? ? ? ? ? ? ? ? ? ? ? [url removed, login to view]("Reassembled Frames on Frame " + FrameNum + ": " + framesList);

?

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } else if (reassembledInFrame != null) {

? ? ? ? ? ? [url removed, login to view]("Frame ").append(FrameNum).append(" is reassembled in frame ").append(reassembledInFrame).append([url removed, login to view]);

? ? ? ? ? ? start_offs = [url removed, login to view];

? ? ? ? ? ? break;

? ? ? ? ? } else if ([url removed, login to view] + startIpOffset == start_offs) {

? ? ? ? ? ? //the buffer has reached the end of the frame, the remaining data is the ethernet trailer

? ? ? ? ? ? start_offs = [url removed, login to view];

? ? ? ? ? ? break;

? ? ? ? ? }

工程 Java 微软 MySQL PHP 软件构架 软件测试 视窗桌面

项目ID: #2980106

关于项目

2个方案 远程项目 活跃的Nov 20, 2009

授予:

Andreena

See private message.

$10 USD 在3天内
(272条评论)
5.9

有2名威客正在参与此工作的竞标,均价$12/小时

praneeth87

See private message.

$14.45 USD 在3天内
(15条评论)
3.5