|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.unboundid.scim.sdk.StaticUtils
public final class StaticUtils
This class provides a number of static utility functions.
| Method Summary | |
|---|---|
static int |
exec(String command,
String[] args,
File workingDirectory,
Map<String,String> environment,
List<String> output)
Executes the specified command on the system and captures its output. |
static String |
getStackTrace(StackTraceElement[] elements)
Returns a single-line string representation of the stack trace. |
static void |
getStackTrace(StackTraceElement[] elements,
StringBuilder buffer)
Appends a single-line string representation of the stack trace to the given buffer. |
static String |
getStackTrace(Throwable t)
Retrieves a single-line string representation of the stack trace for the provided Throwable. |
static void |
getStackTrace(Throwable t,
StringBuilder buffer)
Appends a single-line string representation of the stack trace for the provided Throwable to the given buffer. |
static String |
toLowerCase(String s)
Retrieves an all-lowercase version of the provided string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String toLowerCase(String s)
s - The string for which to retrieve the lowercase version.
public static String getStackTrace(Throwable t)
Throwable. It will include the unqualified name of the
Throwable class, a list of source files and line numbers (if
available) for the stack trace, and will also include the stack trace for
the cause (if present).
t - The Throwable for which to retrieve the stack trace.
Throwable.
public static void getStackTrace(Throwable t,
StringBuilder buffer)
Throwable to the given buffer. It will include the
unqualified name of the Throwable class, a list of source files and
line numbers (if available) for the stack trace, and will also include the
stack trace for the cause (if present).
t - The Throwable for which to retrieve the stack
trace.buffer - The buffer to which the information should be appended.public static String getStackTrace(StackTraceElement[] elements)
elements - The stack trace.
public static void getStackTrace(StackTraceElement[] elements,
StringBuilder buffer)
elements - The stack trace.buffer - The buffer to which the information should be appended.
public static int exec(String command,
String[] args,
File workingDirectory,
Map<String,String> environment,
List<String> output)
throws IOException,
SecurityException,
InterruptedException
command - The command to execute.args - The set of arguments to provide to the command.workingDirectory - The working directory to use for the command, or
null if the default directory
should be used.environment - The set of environment variables that should be
set when executing the command, or
null if none are needed.output - The output generated by the command while it was
running. This will include both standard
output and standard error. It may be
null if the output does not need to
be captured.
IOException - If an I/O problem occurs while trying to execute the
command.
SecurityException - If the security policy will not allow the
command to be executed.
InterruptedException - If the current thread is interrupted by
another thread while it is waiting, then
the wait is ended and an InterruptedException
is thrown.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||