dirk_krause.jtools
Class PlatformInformation

java.lang.Object
  extended by dirk_krause.jtools.PlatformInformation

public class PlatformInformation
extends java.lang.Object


Field Summary
protected  boolean[] bv
          The boolean values array.
static java.lang.String[] jhelpCommand
          The command to run from the init() method
static java.lang.String[] jhelpKeys
          The keys issued by "jhelp platform"
protected  java.lang.String[] sv
          The string values array.
 
Constructor Summary
PlatformInformation()
          Create a new data set using default values.
 
Method Summary
 void cloneFrom(PlatformInformation ori)
          Clone a PlatformInformation data set from an existing data set.
 int getGid()
          Get the users group ID
 java.lang.String getHomeDirectory()
          Get the users home directory.
 java.lang.String getOriginalCurrentDirectory()
          Get the original current working directory.
 java.lang.String getTempDirectory()
          Get the temporary directory.
 int getUid()
          Get the users user ID
 java.lang.String getUserComment()
          Get the users gecos field.
 java.lang.String getUserName()
          Get the users login name.
 boolean init()
          Initialize, run "jhelp platform" to retrieve settings.
 boolean isBigEndian()
          Find out, whether the system stores integer data big-endian.
 boolean isCaseSensitive()
          Find out whether file names are case-sensitive on the system.
 boolean isLeadingDotAvailable()
          Find out whether file names are allowed to have a leading dot.
 boolean isUsingAllDotAll()
          Find out whether the system needs pattern "*.*" to access all files rather than "*"
 boolean isUsingBackslash()
          Find out whether the backslash is used for file name separations.
 boolean isUsingDosStyleFileNames()
          Find out whether the system is restricted to 8+3 file names.
 boolean isUsingDriveLetter()
          Find out whether absolute path names have a drive letter at start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jhelpKeys

public static final java.lang.String[] jhelpKeys
The keys issued by "jhelp platform"


jhelpCommand

public static final java.lang.String[] jhelpCommand
The command to run from the init() method


bv

protected boolean[] bv
The boolean values array.


sv

protected java.lang.String[] sv
The string values array.

Constructor Detail

PlatformInformation

public PlatformInformation()
Create a new data set using default values. Run the init() method to obtain useful data.

Method Detail

cloneFrom

public void cloneFrom(PlatformInformation ori)
Clone a PlatformInformation data set from an existing data set.

Parameters:
ori - The original data set.

isCaseSensitive

public boolean isCaseSensitive()
Find out whether file names are case-sensitive on the system.

Returns:
Flag indicating case-sensitive file names.

isUsingDriveLetter

public boolean isUsingDriveLetter()
Find out whether absolute path names have a drive letter at start.

Returns:
Flag to indicate the use of drive letters (like C:).

isUsingBackslash

public boolean isUsingBackslash()
Find out whether the backslash is used for file name separations.

Returns:
Flag to indicate that backslashes are used (not slashes).

isUsingAllDotAll

public boolean isUsingAllDotAll()
Find out whether the system needs pattern "*.*" to access all files rather than "*"

Returns:
Flag to indicate that "*.*" is needed.

isUsingDosStyleFileNames

public boolean isUsingDosStyleFileNames()
Find out whether the system is restricted to 8+3 file names.

Returns:
Flag to indicate the restriction to 8+3 file names.

isLeadingDotAvailable

public boolean isLeadingDotAvailable()
Find out whether file names are allowed to have a leading dot.

Returns:
Flag to indicate that ".*" file names are allowed.

isBigEndian

public boolean isBigEndian()
Find out, whether the system stores integer data big-endian.

Returns:
The big-endian flag.

getUserName

public java.lang.String getUserName()
Get the users login name.

Returns:
The login name.

getHomeDirectory

public java.lang.String getHomeDirectory()
Get the users home directory.

Returns:
The home directory.

getUserComment

public java.lang.String getUserComment()
Get the users gecos field.

Returns:
The user comment.

getTempDirectory

public java.lang.String getTempDirectory()
Get the temporary directory.

Returns:
The temporary directory.

getOriginalCurrentDirectory

public java.lang.String getOriginalCurrentDirectory()
Get the original current working directory.

Returns:
The current working directory when the application started.

getUid

public int getUid()
Get the users user ID

Returns:
The UID.

getGid

public int getGid()
Get the users group ID

Returns:
The GID:

init

public boolean init()
Initialize, run "jhelp platform" to retrieve settings.