org.hyperic.sigar
Class FileSystemMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by org.hyperic.sigar.FileSystemMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class FileSystemMap
extends java.util.HashMap

Helper class to build a map of mounted file systems.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
FileSystemMap()
           
 
Method Summary
 FileSystem getFileSystem(java.lang.String name)
           
 FileSystem getMountPoint(java.lang.String name)
          Find the file system the given file or directory is within.
 void init(FileSystem[] fslist)
          Populate the map.
 boolean isMounted(java.lang.String name)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          FileSystemMap is read-only, this method is unsupported.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

FileSystemMap

public FileSystemMap()
Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
FileSystemMap is read-only, this method is unsupported.

Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.HashMap
See Also:
init(org.hyperic.sigar.FileSystem[])

init

public void init(FileSystem[] fslist)
Populate the map. FileSystem.getDirName is used as the map key.


getFileSystem

public FileSystem getFileSystem(java.lang.String name)

isMounted

public boolean isMounted(java.lang.String name)

getMountPoint

public FileSystem getMountPoint(java.lang.String name)
Find the file system the given file or directory is within.

Returns:
FileSystem or null if file or directory name does not exist.


Copyright ? 2004-2009 Hyperic. All Rights Reserved.