diff --git a/bindings/java/src/net/hyperic/sigar/NetPortMap.java b/bindings/java/src/net/hyperic/sigar/NetPortMap.java index 17a918ec..0f5b549a 100644 --- a/bindings/java/src/net/hyperic/sigar/NetPortMap.java +++ b/bindings/java/src/net/hyperic/sigar/NetPortMap.java @@ -10,7 +10,8 @@ public class NetPortMap { private Map inbound; private Map outbound; private int[] states; - + private int inboundTotal, outboundTotal; + public NetPortMap() { this.sigar = new Sigar(); } @@ -37,6 +38,7 @@ public class NetPortMap { public void stat(int flags) throws SigarException { this.inbound = new HashMap(); this.outbound = new HashMap(); + this.inboundTotal = this.outboundTotal = 0; this.states = new int[NetFlags.TCP_UNKNOWN]; for (int i=0; i