Bug in Java HashMap Code
$15-20 USD
Veröffentlicht vor mehr als 14 Jahren
$15-20 USD
Bezahlt bei Lieferung
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 && [login to view URL](new Integer(FrameNum)) != null) {
? ? ? ? ? ? List<Integer> framesList = [login to view URL](new Integer(FrameNum));
? ? ? ? ? ? int total = 0;
? ? ? ? ? ? Iterator<Integer> it = [login to view URL]();
? ? ? ? ? ? while ([login to view URL]()) {
? ? ? ? ? ? ? Integer frame = [login to view URL]();
? ? ? ? ? ? ? byte[] frameData = [login to view URL](frame);
? ? ? ? ? ? ? total += [login to view URL];
? ? ? ? ? ? }
? ? ? ? ? ? PacketBuf = new byte[total];
? ? ? ? ? ? it = [login to view URL]();
? ? ? ? ? ? int pos = 0;
? ? ? ? ? ? while ([login to view URL]()) {
? ? ? ? ? ? ? Integer frame = [login to view URL]();
? ? ? ? ? ? ? byte[] frameData = [login to view URL](frame);
? ? ? ? ? ? ? [login to view URL](frameData, 0, PacketBuf, pos, [login to view URL]);
? ? ? ? ? ? ? pos += [login to view URL];
? ? ? ? ? ? }
? ? ? ? ? ? start_offs = 0;
? ? ? ? ? ? [login to view URL]("Reassembled Frames on Frame " + FrameNum + ": " + framesList).append([login to view URL]);
? ? ? ? ? ? ? ? ? ? ? ? [login to view URL]("Reassembled Frames on Frame " + FrameNum + ": " + framesList);
?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } else if (reassembledInFrame != null) {
? ? ? ? ? ? [login to view URL]("Frame ").append(FrameNum).append(" is reassembled in frame ").append(reassembledInFrame).append([login to view URL]);
? ? ? ? ? ? start_offs = [login to view URL];
? ? ? ? ? ? break;
? ? ? ? ? } else if ([login to view URL] + startIpOffset == start_offs) {
? ? ? ? ? ? //the buffer has reached the end of the frame, the remaining data is the ethernet trailer
? ? ? ? ? ? start_offs = [login to view URL];
? ? ? ? ? ? break;
? ? ? ? ? }
Projekt-ID: 2980106
Über das Projekt
2 Vorschläge
Remote Projekt
Aktiv vor 14 Jahren
Möchten Sie etwas Geld verdienen?
Vorteile einer Ausschreibung auf Freelancer
Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
2 Freelancer bieten im Durchschnitt $12 USD für diesen Auftrag
$14,45 USD in 3 Tagen
5,0 (15 Bewertungen)