com.sleepycat.je.utilint
Class CmdUtil
java.lang.Object
com.sleepycat.je.utilint.CmdUtil
public class CmdUtil
- extends Object
Convenience methods for command line utilities.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CmdUtil
public CmdUtil()
getArg
public static String getArg(String[] argv,
int whichArg)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
readLongNumber
public static long readLongNumber(String longVal)
- Parse a string into a long. If the string starts with 0x, this is a hex
number, else it's decimal.
formatEntry
public static void formatEntry(StringBuffer sb,
byte[] entryData,
boolean formatUsingPrintable)
makeUtilityEnvironment
public static EnvironmentImpl makeUtilityEnvironment(File envHome,
boolean readOnly)
throws DatabaseException
- Create an environment suitable for utilities. Utilities should in
general send trace output to the console and not to the db log.
- Throws:
DatabaseException
Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.