com.sleepycat.je.utilint
Class CmdUtil

java.lang.Object
  extended bycom.sleepycat.je.utilint.CmdUtil

public class CmdUtil
extends Object

Convenience methods for command line utilities.


Constructor Summary
CmdUtil()
           
 
Method Summary
static String getArg(String[] argv, int whichArg)
           
static EnvironmentImpl makeUtilityEnvironment(File envHome, boolean readOnly)
          Create an environment suitable for utilities.
static long readLongNumber(String longVal)
          Parse a string into a long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmdUtil

public CmdUtil()
Method Detail

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.


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 Sleepycat, Inc. All Rights Reserved.