Bug in Java HashMap Code
$15-20 USD
Publicado hace más de 14 años
$15-20 USD
Pagado a la entrega
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;
? ? ? ? ? }
ID del proyecto: 2980106
Información sobre el proyecto
2 propuestas
Proyecto remoto
Activo hace 14 años
¿Buscas ganar dinero?
Beneficios de presentar ofertas en Freelancer
Fija tu plazo y presupuesto
Es gratis registrarse y presentar ofertas en los trabajos
2 freelancers están ofertando un promedio de $12 USD por este trabajo
$14,45 USD en 3 días
5,0 (15 comentarios)