![]() |
Quadcap Embeddable Database |
Definition at line 75 of file Util.java.
Static Public Member Functions | |
| Vector | split (String s, char delim) |
| Split a string into a vector of elements. | |
| Vector | split (String s, char delim, int cnt) |
| Hashtable | parseArgs (String args[]) |
| String | readFile (String filename) |
| String | strBytes (byte[] buf, int offset, int len) |
| String | hexBytes (byte[] buf) |
| String | hexBytes (byte[] buf, int off, int len) |
| String | hexInts (byte[] buf) |
| String | hexInts (byte[] buf, int off, int len) |
| String | strBytes (byte[] buf) |
| boolean | boolProperty (String s) |
| int | intProperty (String s, int defVal) |
| String | strProperty (String s, String defVal) |
| byte[] | bytes (String s) |
| byte[] | strCharsAsBytes (String s) |
| To hell with character encodings ;-). | |
| void | bytesToChars (byte[] bbuf, int boff, char[] cbuf, int coff, int clen) |
| void | charsToBytes (char[] cbuf, int coff, byte[] bbuf, int boff, int clen) |
| byte[] | bytes (int i) |
| Convert an int to a byte array, MSB first. | |
| byte[] | bytes (long i) |
| Convert a long to a byte array, MSB first. | |
| int | integer (byte[] buf) |
| Convert a byte array which represents an integer into an integer. | |
| int | integer (byte[] buf, int pos) |
| Extract an integer from four bytes in a byte array. | |
| void | putInt (byte[] buf, int pos, int val) |
| void | putLong (byte[] buf, int pos, long val) |
| final long | bytesToLong (byte[] buf) |
| Convert a byte array which represents a long into a long. | |
| final long | bytesToLong (byte[] buf, int offset) |
| Convert a byte array which represents a long into a long. | |
| int | compareBytes (byte[] k1, int s1, int c1, byte[] k2, int s2, int c2) |
| Byte-array comparison. | |
| int | compareBytes (byte[] b1, byte[] b2) |
| File | userFile (String name) |
| Return a File object corresponding to the specified file name. | |
| String[] | listFiles (final File f) |
| Like File.list(), but returns directories first, and sorts alpha. | |
| String | getStackTrace (Throwable t) |
| String | stackTrace () |
| Return a string showing the current stack trace. | |
| String | stackTrace (boolean condense) |
| String | stackTrace (Throwable e, boolean condense) |
| Return a string showing the current stack trace. | |
| void | copyStream (InputStream in, OutputStream out) throws IOException |
| int | execCommand (String cmd, OutputStream out, OutputStream err) |
| int | execCommand (String[] cmdarray, OutputStream out, OutputStream err) |
| int | waitFor (Process p, OutputStream out, OutputStream err) throws IOException |
| int | execCommand (String cmd, OutputStream out) |
| String | execCommand (String cmd) |
| String | execCommand (String[] cmd) |
| String | execCommand (String a, String b) |
| String | execCommand (String a, String b, String c) |
| Thread | makeCopyThread (final InputStream in, final OutputStream out) |
| Create a thread which copies bytes from an input stream to an output stream until end of file is reached. | |
| final void | sleep (long ms) |
| Utility to sleep without having to worry about catching InterruptedException. | |
| final void | join (Thread t) |
| Utility to join without having to worry about catching InterruptedException. | |
| final int | waitFor (Process p) |
| Utility to wait for a process without having to worry about catching InterruptedException. | |
| final Properties | parsePropsString (String extraProps) |
| Parse a semicolon-separated property list:. | |
| Object | checkCapacity (Object array, int desiredcap) |
| Generic array resizer. | |
| List | parseIntList (String s) |
| Parse a comma-separated list of integers or integer ranges. | |
| int | compareObjects (Object a, Object b) |
| String | htmlEscape (String s) |
Static Public Attributes | |
| char[] | hexMap |
Static Package Attributes | |
| HashMap | traces = new HashMap() |
| int | lastTrace = 0 |
|
|
Definition at line 224 of file Util.java. References com.quadcap.util.Util.boolProperty(). Referenced by com.quadcap.util.Util.boolProperty(). |
|
|
Convert a long to a byte array, MSB first.
|
|
|
Convert an int to a byte array, MSB first.
|
|
|
Definition at line 237 of file Util.java. References com.quadcap.util.Util.bytes(). Referenced by com.quadcap.util.Util.bytes(). |
|
||||||||||||||||||||||||
|
Definition at line 253 of file Util.java. References com.quadcap.util.Util.bytesToChars(). Referenced by com.quadcap.util.Util.bytesToChars(). |
|
||||||||||||
|
Convert a byte array which represents a long into a long.
|
|
|
Convert a byte array which represents a long into a long.
Definition at line 360 of file Util.java. References com.quadcap.util.Util.bytesToLong(). Referenced by com.quadcap.util.Util.bytesToLong(). |
|
||||||||||||||||||||||||
|
Definition at line 263 of file Util.java. References com.quadcap.util.Util.charsToBytes(). Referenced by com.quadcap.util.Util.charsToBytes(), and com.quadcap.util.Util.strCharsAsBytes(). |
|
||||||||||||
|
Generic array resizer.
Definition at line 688 of file Util.java. References com.quadcap.util.Util.checkCapacity(). Referenced by com.quadcap.util.Util.checkCapacity(). |
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
Byte-array comparison.
Definition at line 394 of file Util.java. References com.quadcap.util.Util.compareBytes(). Referenced by com.quadcap.util.Util.compareBytes(). |
|
||||||||||||
|
Definition at line 730 of file Util.java. References com.quadcap.util.Util.compareObjects(). Referenced by com.quadcap.util.Util.compareObjects(). |
|
||||||||||||
|
Definition at line 527 of file Util.java. References com.quadcap.util.Util.copyStream(). Referenced by com.quadcap.util.Util.copyStream(). |
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 549 of file Util.java. References com.quadcap.util.Util.waitFor(). |
|
||||||||||||||||
|
Definition at line 535 of file Util.java. References com.quadcap.util.Util.execCommand(), and com.quadcap.util.Util.waitFor(). Referenced by com.quadcap.util.Util.execCommand(). |
|
|
Definition at line 455 of file Util.java. References com.quadcap.util.Util.getStackTrace(). Referenced by com.quadcap.util.Util.getStackTrace(). |
|
||||||||||||||||
|
Definition at line 184 of file Util.java. References com.quadcap.util.Util.hexMap. |
|
|
Definition at line 179 of file Util.java. References com.quadcap.util.Util.hexBytes(). Referenced by com.quadcap.util.Util.hexBytes(). |
|
||||||||||||||||
|
Definition at line 203 of file Util.java. References com.quadcap.util.Util.hexMap. |
|
|
Definition at line 199 of file Util.java. References com.quadcap.util.Util.hexInts(). Referenced by com.quadcap.util.Util.hexInts(). |
|
|
Definition at line 744 of file Util.java. References com.quadcap.util.Util.htmlEscape(). Referenced by com.quadcap.util.Util.htmlEscape(). |
|
||||||||||||
|
Extract an integer from four bytes in a byte array.
|
|
|
Convert a byte array which represents an integer into an integer.
Definition at line 311 of file Util.java. References com.quadcap.util.Util.integer(). Referenced by com.quadcap.util.Util.integer(). |
|
||||||||||||
|
Definition at line 228 of file Util.java. References com.quadcap.util.Util.intProperty(). Referenced by com.quadcap.util.Util.intProperty(). |
|
|
Utility to join without having to worry about catching InterruptedException.
Definition at line 643 of file Util.java. References com.quadcap.util.Util.join(). Referenced by com.quadcap.util.Util.join(). |
|
|
Like File.list(), but returns directories first, and sorts alpha.
Definition at line 433 of file Util.java. References com.quadcap.util.Util.listFiles(). Referenced by com.quadcap.util.Util.listFiles(). |
|
||||||||||||
|
Create a thread which copies bytes from an input stream to an output stream until end of file is reached.
Definition at line 604 of file Util.java. References com.quadcap.util.Util.makeCopyThread(). Referenced by com.quadcap.util.Util.makeCopyThread(), and com.quadcap.util.Util.waitFor(). |
|
|
Definition at line 106 of file Util.java. References com.quadcap.util.Util.parseArgs(). Referenced by com.quadcap.util.Util.parseArgs(). |
|
|
Parse a comma-separated list of integers or integer ranges. Example: 1,2 Example: 1,3-5,77
Definition at line 708 of file Util.java. References com.quadcap.util.Util.parseIntList(). Referenced by com.quadcap.util.Util.parseIntList(). |
|
|
Parse a semicolon-separated property list:. prop1=val1;prop2=val2 Definition at line 671 of file Util.java. References com.quadcap.util.Util.parsePropsString(). Referenced by com.quadcap.util.Util.parsePropsString(). |
|
||||||||||||||||
|
Definition at line 336 of file Util.java. References com.quadcap.util.Util.putInt(). Referenced by com.quadcap.util.Util.putInt(). |
|
||||||||||||||||
|
Definition at line 343 of file Util.java. References com.quadcap.util.Util.putLong(). Referenced by com.quadcap.util.Util.putLong(). |
|
|
Definition at line 127 of file Util.java. References com.quadcap.util.Util.readFile(). Referenced by com.quadcap.util.Util.readFile(). |
|
|
Utility to sleep without having to worry about catching InterruptedException.
Definition at line 629 of file Util.java. References com.quadcap.util.Util.sleep(). Referenced by com.quadcap.util.Util.sleep(). |
|
||||||||||||||||
|
|
|
||||||||||||
|
Split a string into a vector of elements.
Definition at line 79 of file Util.java. References com.quadcap.util.Util.split(). Referenced by com.quadcap.util.Util.split(). |
|
||||||||||||
|
Return a string showing the current stack trace.
Definition at line 480 of file Util.java. References com.quadcap.util.Util.lastTrace, and com.quadcap.util.Util.traces. |
|
|
Definition at line 473 of file Util.java. References com.quadcap.util.Util.stackTrace(). |
|
|
Return a string showing the current stack trace.
Definition at line 469 of file Util.java. Referenced by com.quadcap.util.Util.stackTrace(). |
|
|
|
|
||||||||||||||||
|
Definition at line 148 of file Util.java. References com.quadcap.util.Util.hexMap, and com.quadcap.util.Util.strBytes(). Referenced by com.quadcap.util.Util.strBytes(). |
|
|
To hell with character encodings ;-).
Definition at line 246 of file Util.java. References com.quadcap.util.Util.charsToBytes(), and com.quadcap.util.Util.strCharsAsBytes(). Referenced by com.quadcap.util.Util.strCharsAsBytes(). |
|
||||||||||||
|
Definition at line 233 of file Util.java. References com.quadcap.util.Util.strProperty(). Referenced by com.quadcap.util.Util.strProperty(). |
|
|
Return a File object corresponding to the specified file name. If the name is relative, it is located relative to the user's current directory. This is helpful for the case when we run as a service from the /winnt/system32 directory and want to open files relative to our install root.
Definition at line 424 of file Util.java. References com.quadcap.util.Util.userFile(). Referenced by com.quadcap.util.Util.userFile(). |
|
|
Utility to wait for a process without having to worry about catching InterruptedException.
|
|
||||||||||||||||
|
Definition at line 563 of file Util.java. References com.quadcap.util.Util.makeCopyThread(), and com.quadcap.util.Util.waitFor(). Referenced by com.quadcap.util.Util.execCommand(), and com.quadcap.util.Util.waitFor(). |
|
|
Initial value:
Definition at line 145 of file Util.java. Referenced by com.quadcap.util.Util.hexBytes(), com.quadcap.util.Util.hexInts(), and com.quadcap.util.Util.strBytes(). |
|
|
Definition at line 464 of file Util.java. Referenced by com.quadcap.util.Util.stackTrace(). |
|
|
Definition at line 463 of file Util.java. Referenced by com.quadcap.util.Util.stackTrace(). |