/** * Write packet. * * @param is * the is * @param os * the os * * @throws IOException * Signals that an I/O exception has occurred. */ private static void writePacket(PcapByteInputStream is, PcapByteOutputStream os) throws IOException { PcapPacket packet = null; try { while (true) { packet = is.getPacket(); if (packet == null) { break; } os.write(packet); } } catch (EOFException e) { //LOG.debug("Ignorable exception in writePacket", e); } }
packet = pcapIs.getPacket(); if (packet == null) break;
PcapPacket packet = pcapByteInputStream.getPacket();
PcapPacket packet = pcapByteInputStream.getPacket();