Note that some of the methods are covered by recent Java versions but are re-implemented here for compatibility reasons.
|
Static Public Member Functions |
| static Object | saveOurClass (Object anInstance) |
| | Classes of objects registered via this method are protected against the class garbage collection.
|
| static String | uniqId () |
| | Returns a (hopefully) system-wide unique ID.
|
| static boolean | copy (InputStream fin, OutputStream fout, boolean continuous) throws DirectorException |
| | Copy all the data from an InputStream to an OutputStream.
|
| static void | copy (InputStream fin, OutputStream fout) throws DirectorException |
| | Copy in non-continuous mode.
|
| static long | digestData (InputStream fin, MessageDigest digest) throws IOException |
| | Read all data from InputStream and update a digest accordingly.
|
| static MessageDigest | md5sum (File file) throws DirectorException |
| | Compute md5 checksum for a file.
|
| static MessageDigest | md5sum (InputStream in) throws DirectorException |
| | Compute md5 checksum for a file.
|
| static long | copyData (InputStream fin, OutputStream out) throws IOException |
| | Copy all data from an InputStream to an OutputStream.
|
| static long | copyObject (Object source, OutputStream out, boolean closeOnTerm) throws IOException |
| | Copy object from into an OutputStream.
|
| static int | readEntire (InputStream in, byte buffer[], int offset, int length) throws IOException |
| | Read a block of data from an InputStream.
|
| static int | readEntire (InputStream in, byte buffer[], int length) throws IOException |
| | Read a block of data from an InputStream.
|
| static void | debug (LogEntry log) |
| | Log a debug message.
|
| static void | debug (int level, String message) |
| | Log a debug message if debug level is high enough for the message to be logged.
|
| static void | log (LogEntry log) |
| | Log a message.
|
| static void | log (int level, String message) |
| | Log a message at the specified priority level.
|
| static void | exit () |
| | Exit without an error.
|
| static void | exit (int exitcode) |
| | Exit with specified exit code.
|
| static void | rememberCleanup (CleanUpable cleanup) |
| | Mark an object as to be cleaned up by exit().
|
| static String | join (Vector list, String separator) |
| | Join the string representation of a list of objects into one single resulting string.
|
| static String | join (Enumeration list, String separator) |
| | Join the string representation of an enumeration of strings into one single resulting string.
|
| static Vector | split (String str, String separator) |
| | Split a string into a vector of strings.
|
| static Vector | split (String str) |
| | Split a string into a vector of strings.
|
| static Hashtable | getOpt (String args[], String argopts[]) throws ArgumentException |
| | Process command line arguments.
|
| static void | attachErrorLogger (final Process proc) |
| | Attach an thread to a process' error stream logging every error message via the default logger.
|
| static Process | exec (String cmd) throws IOException |
| | Execute a command.
|
| static Process | exec (String cmd[]) throws IOException |
| | Execute a command.
|
| static Vector | runParsePerl (String split, String code, String args[]) throws DirectorException |
| static int | execWait (String cmd[]) |
| | Execute a command, attach an error logger, wait for the command's termination and return its exit code to the caller.
|
| static String[] | ShellCommand (String command) |
| | Accepts a shell command string, returns a String array containing the same command ready for execution via exec() and the system's command shell.
|
| static int | execWait (String cmd[], boolean logErrors) |
| | Execute a command, optionally attach an error logger, wait for the command's termination and return its exit code to the caller.
|
| static int | execWait (String cmd[], boolean logErrors, long timeout) |
| | Execute a command, optionally attach an error logger, wait for the command's termination and return its exit code to the caller.
|
| static void | consume (final InputStream stream) |
| static int | workingWaitFor (Process process, boolean outConsumed, boolean errorConsumed) throws InterruptedException |
| static int | workingWaitFor (Process process, boolean outConsumed, boolean errorConsumed, final long timeout) throws InterruptedException |
| | do a Process.waitFor() and consume the exec()-ed commands output in order to avoid hangs.
|
| static Enumeration | execUtility (String cmd[]) throws DirectorException |
| | run a command and read its output via an Enumeration.
|
| static Enumeration | execFilter (String cmd[], final Object source) throws DirectorException |
| | run a command, pipe the source string in and make the output accessible via the returned Enumeration.
|
| static String | findAuth (String principal) |
| | Find an authentication database entry for a given principal (login name).
|
| static int | findUidNumber (int start) throws DirectorException |
| | By using the people database find an unused uid number higher than the specified start limit.
|
| static int | findUidNumber (int start, int end) throws DirectorException |
| | By using the people database find an unused uid between two given limits.
|
| static int | findGidNumber (int start) throws DirectorException |
| | By using the people database find an unused gid number higher than the specified start limit.
|
| static int | findGidNumber (int start, int end) throws DirectorException |
| | By using the people database find an unused uid between two given limits.
|
| static int | findFreeNumber (int start, int end, String field) throws DirectorException |
| | By using the people database find an unused uid or gid number between two given limits.
|
| static void | sort (Vector v, MyComparator c) |
| | Sort a vector in the order specified by the given comparator.
|
| static void | sort (Object arr[], MyComparator c) |
| | Sort an array in the order specified by the given comparator.
|
| static String | expand (String str, final DBObject dbo) throws DirectorException |
| | Expand variable references in a string using the attributes of the given database entry as variable/value pairs.
|
| static String | expand (String str, final ExpandVars expander) throws DirectorException |
| | Expand variable references in a string using the given ExpandVars class to expand variable names into their values.
|
| static String | applyModifier (String modifier, String val, final ExpandVars expander) throws DirectorException |
| | Apply a variable modifier to a value.
|
| static void | background () |
| | Put the current thread into the background (= decrease its priority).
|
| static void | executeLocalqueue () |
| | Do something reasonable with the jobs in the local job queue.
|
| static void | doEvent (DBObject dbo, final DBConnection dir, final Record data, final String type) |
| static void | doEvent (DBObject dbo, final DBConnection dir, final Record data, final String type, boolean warnIfNotApplicable) |
| | Execute an event for a given database entry and the given corresponding object editor data.
|
| static void | makeZip (File what, String prefix, OutputStream out) throws DirectorException |
| | Zip the given file and send the zip file to the given stream.
|
| static void | makeZip (File what, String prefix, ZipOutputStream out) throws DirectorException |
| static String | timeStamp () |
| | Return a string representing the current time in a (director) standard format.
|
| static String | timeStamp (Date time) |
| | Return a string representing the passed time in a (director) standard format.
|
| static void | main (String args[]) |
| static DBObject | fieldToDBObject (Field f) |
| static Record | toDBEditRecord (DBObject dbo) |
| static DBObject | toDBObject (Record rec) |
| static String | getUser () |
| static void | trackJob (Workflow workflow) throws DirectorException |
| static String | stacktrace (Throwable e) |
| static Enumeration | getHostnames (String name) |
| | Get all names of a specific host/alias from the hosts directory.
|
| static void | removeDir (File dir) throws DirectorException |
| | Remove a file/directory recursively.
|
| static String | asciify (String message) |
| | translate some international characters in a string into an ASCII representation
|
| static String | daytimeStamp (Date time) |
| | Return a string representing the current day time.
|
| static String | daytimeStamp () |
| static void | setThreadSubStatus (String status) |
| static void | backupFile (File file) |
| | Same as backupFile(), but saves file without checking if there is already an identical backup copy.
|
| static void | backupFile (File target, boolean onlyIfDifferent) |
| | Save a backup copy of the given file.
|
Static Public Attributes |
| static int | debuglev = 0 |
| | The program's debug level.
|
| static PrintStream | debugout = System.err |
| | The Stream where debug output is sent to.
|
| static Vector | classRefs = new Vector() |
| | Vector used to store references to classes for the saveOurClass mechanism.
|
| static Hashtable | progOptions = new Hashtable() |
| | This hash stores the command line options of the current program.
|
Static Protected Attributes |
| static String[] | asciifiers |
Static Package Attributes |
| static Hashtable | freeNumber = new Hashtable() |
| static SimpleDateFormat | hourMinSecFormat = new SimpleDateFormat( "HH:mm:ss" ) |