com.novell.service.file.nw
Class NameSpace

java.lang.Object
  |
  +--com.novell.service.file.nw.NameSpace

public class NameSpace
extends java.lang.Object

Provides an interface for getting the default name space of the platform on which the JVM is executing. It also provides a central interface for changing NetWare file system name space integer values into strings and vice versa.


Field Summary
static int DOS_INT
          The NetWare DOS name space flag.
static int FTAM_INT
          The NetWare FTAM name space flag.
static int LONG_INT
          The NetWare LONG name space flag.
static int MAC_INT
          The NetWare MAC name space flag.
static int NFS_INT
          The NetWare NFS name space flag.
 
Constructor Summary
NameSpace()
           
 
Method Summary
static int getPlatformDefaultNameSpace()
          Returns the default NetWare name space number depending on the OS under which the current JVM is running.
static int nameToNumber(java.lang.String name)
          Returns a name space number given a name space string.
static java.lang.String numberToName(int ns)
          Returns a name space string given a NetWare name space number.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOS_INT

public static final int DOS_INT
The NetWare DOS name space flag.

DOS_INT = 0


MAC_INT

public static final int MAC_INT
The NetWare MAC name space flag.

MAC_INT = 1


NFS_INT

public static final int NFS_INT
The NetWare NFS name space flag.

NFS_INT = 2


FTAM_INT

public static final int FTAM_INT
The NetWare FTAM name space flag.

FTAM_INT = 3


LONG_INT

public static final int LONG_INT
The NetWare LONG name space flag.

LONG_INT = 0

Constructor Detail

NameSpace

public NameSpace()
Method Detail

nameToNumber

public static int nameToNumber(java.lang.String name)
Returns a name space number given a name space string.
Parameters:
name - The name space string.
Returns:
The valid NetWare name space number for the name space string. If the name is invalid, -1 is returned.

numberToName

public static java.lang.String numberToName(int ns)
Returns a name space string given a NetWare name space number.
Parameters:
ns - The name space number.
Returns:
The valid name space string for the NetWare name space number. If the number is invalid, NULL is returned.

getPlatformDefaultNameSpace

public static int getPlatformDefaultNameSpace()
Returns the default NetWare name space number depending on the OS under which the current JVM is running.

This method returns the best-case name space, because not every NetWare volume will support the name space returned. The name space returned here must be filtered through the list of name spaces loaded on a particular volume to get the optimum usable name space for the volume.

Returns:
The NetWare name space number.