public void receivePacket(Packet packet) { try { System.out.println(new String(packet.data, "gb2312")); } catch (Exception e) { e.printStackTrace(); } }
public Jpcap() { try { this.getDevice(); } catch (Exception e) { e.printStackTrace(); } // getDevice(); }