de.fh_mannheim.mm.dms.framework
Class ShellManager

java.lang.Object
  extended byde.fh_mannheim.mm.dms.framework.ShellManager

public class ShellManager
extends java.lang.Object

ShellManager starts external programs.

Version:
$Revision: 1.5 $
Author:
Jan Löffler, mail@jlsoft.de

Field Summary
static java.lang.String[][] ASSOCIATIONS
          Associations for programs and corresponding filetypes
 
Constructor Summary
ShellManager()
           
 
Method Summary
static boolean execute(java.lang.String strFilename)
          Executes an external file.
static boolean execute(java.lang.String strFilename, java.lang.String strOutputFile)
          Executes an external file.
static boolean execute(java.lang.String strFilename, java.io.Writer out)
          Executes an external file.
static boolean executeDocument(java.lang.String strFilename)
          Executes an external file.
static boolean existsFile(java.lang.String strFilename)
          Test if a file exists.
static long getFileSize(java.lang.String strFilename)
          Get the size in bytes of a file.
static boolean isAbsolutePath(java.lang.String strFilename)
          Test if a path is absolute.
static boolean mkdir(java.lang.String strPath)
          Make all directories.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSOCIATIONS

public static final java.lang.String[][] ASSOCIATIONS
Associations for programs and corresponding filetypes

Constructor Detail

ShellManager

public ShellManager()
Method Detail

executeDocument

public static boolean executeDocument(java.lang.String strFilename)
Executes an external file.

Parameters:
strFilename - Filename with path
Returns:
true, if successful

execute

public static boolean execute(java.lang.String strFilename)
Executes an external file.

Parameters:
strFilename - Filename with path
Returns:
true, if successful

execute

public static boolean execute(java.lang.String strFilename,
                              java.lang.String strOutputFile)
Executes an external file.

Parameters:
strFilename - Filename with path
strOutputFile - File to save output text
Returns:
true, if successful

execute

public static boolean execute(java.lang.String strFilename,
                              java.io.Writer out)
Executes an external file.

Parameters:
strFilename - Filename with path
out - Writer
Returns:
true, if successful

existsFile

public static boolean existsFile(java.lang.String strFilename)
Test if a file exists.

Parameters:
strFilename - Filename
Returns:
true, if file exists

isAbsolutePath

public static boolean isAbsolutePath(java.lang.String strFilename)
Test if a path is absolute.

Parameters:
strFilename - Filename
Returns:
true, if file exists

getFileSize

public static long getFileSize(java.lang.String strFilename)
Get the size in bytes of a file.

Parameters:
strFilename - Filename
Returns:
Filesize

mkdir

public static boolean mkdir(java.lang.String strPath)
Make all directories.

Parameters:
strPath - Directories to be created
Returns:
true, if successful