net.sf.sdedit.util
Class WindowsRegistry

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.sdedit.util.WindowsRegistry
All Implemented Interfaces:
Runnable

public final class WindowsRegistry
extends Thread

Utility class for accessing the Windows registry by means of the reg.exe tool.

Author:
Markus Strauch

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static String getValue(String category, String key)
          Starts a process on a newly created thread that uses the reg.exe tool in order to compute the value for the given category and key.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.run()

getValue

public static String getValue(String category,
                              String key)
Starts a process on a newly created thread that uses the reg.exe tool in order to compute the value for the given category and key. If the tool does not perform the task in at most two seconds, or if the tool does not find the key, we return null

Parameters:
category - the registry category in which to lookup the key
key - the name of the key
Returns:
the value for the key


Copyright © 2011. All Rights Reserved.