diff --git a/bindings/java/src/jni/generate.pl b/bindings/java/src/jni/generate.pl index 6aaa2be0..060750b6 100644 --- a/bindings/java/src/jni/generate.pl +++ b/bindings/java/src/jni/generate.pl @@ -921,6 +921,8 @@ my %classes = ( ], ); +$classes{DirUsage} = $classes{DirStat}; + my %cmds = ( Mem => { AIX => 'top', @@ -1203,7 +1205,7 @@ EOF EOF ); -my %has_name_arg = map { $_, 1 } qw(FileSystemUsage FileAttrs DirStat +my %has_name_arg = map { $_, 1 } qw(FileSystemUsage FileAttrs DirStat DirUsage NetInterfaceConfig NetInterfaceStat); my %proc_no_arg = map { $_, 1 } qw(stat); my %get_not_impl = map { $_, 1 } qw(net_route net_connection who diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index b5f8629c..2700331c 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -593,6 +593,11 @@ public class Sigar implements SigarProxy { return DirStat.fetch(this, name); } + public DirUsage getDirUsage(String name) + throws SigarException { + return DirUsage.fetch(this, name); + } + /** * Get list of cpu infomation. * @exception SigarException on failure. diff --git a/bindings/java/src/net/hyperic/sigar/SigarProxy.java b/bindings/java/src/net/hyperic/sigar/SigarProxy.java index 8a43ef45..95d351e4 100644 --- a/bindings/java/src/net/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/net/hyperic/sigar/SigarProxy.java @@ -105,6 +105,8 @@ public interface SigarProxy { public DirStat getDirStat(String name) throws SigarException; + public DirUsage getDirUsage(String name) throws SigarException; + public CpuInfo[] getCpuInfoList() throws SigarException; public Cpu[] getCpuList() throws SigarException; diff --git a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java index 3d9d887b..c66b5cf8 100644 --- a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java +++ b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java @@ -293,6 +293,12 @@ public class SynchronizedSigar implements SigarProxy { return this.sigar.getDirStat(name); } + public synchronized DirUsage getDirUsage(String name) + throws SigarException + { + return this.sigar.getDirUsage(name); + } + public synchronized CpuInfo[] getCpuInfoList() throws SigarException {