Find Jobs
Hire Freelancers

Bug in Java HashMap Code

$15-20 USD

Terminado
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
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$10 USD en 3 días
4,9 (272 comentarios)
5,9
5,9
2 freelancers están ofertando un promedio de $12 USD por este trabajo
Avatar del usuario
See private message.
$14,45 USD en 3 días
5,0 (15 comentarios)
3,5
3,5

Sobre este cliente

Bandera de UNITED STATES
Carmel Valley, United States
5,0
302
Forma de pago verificada
Miembro desde jul 1, 2002

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.