Java Doc for RegistryKey.java in  » Installer » VAInstall » com » ice » jni » registry » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Installer » VAInstall » com.ice.jni.registry 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ice.jni.registry.RegistryKey

RegistryKey
public class RegistryKey (Code)
The RegistryKey class represents a key in the registry. The class also provides all of the native interface calls. You should refer to the Windows Registry API documentation for the details of any of the native methods. The native implementation performs almost no processing before or after a given call, so their behavior should match the API's documented behavior precisely. Note that you can not open a subkey without an existing open RegistryKey. Thus, you need to start with one of the top level keys defined in the Registry class and open relative to that.
See Also:   com.ice.jni.registry.Registry
See Also:   com.ice.jni.registry.RegistryValue

Inner Class :class RegistryKeyEnumerator implements Enumeration
Inner Class :class RegistryValueEnumerator implements Enumeration

Field Summary
final public static  intACCESS_ALL
    
final public static  intACCESS_DEFAULT
     Constants used to determine the access level for newly opened keys.
final public static  intACCESS_EXECUTE
    
final public static  intACCESS_READ
    
final public static  intACCESS_WRITE
    
protected  booleancreated
     Used to indicate whether or not the key was created when method createSubKey() is called, otherwise false.
protected  inthKey
     This is the actual DWORD key that is returned from the Registry API.
protected  Stringname
     The full pathname of this key.

Constructor Summary
public  RegistryKey(int hKey, String name)
    
public  RegistryKey(int hKey, String name, boolean created)
    

Method Summary
native public  voidcloseKey()
     Closes this subkey.
native public  RegistryKeyconnectRegistry(String hostName)
     Connect to the remote registry on hostName. This method will only work when invoked on a toplevel key.
public  RegistryKeycreateSubKey(String subkey, String className)
     Create, and open, a Registry subkey of this key with WRITE access. If the key already exists, it is opened, otherwise it is first created and then opened.
Parameters:
  subkey - The name of the subkey to create.
Parameters:
  className - The className of the created subkey.
native public  RegistryKeycreateSubKey(String subKey, String className, int access)
     Create a new subkey, or open the existing one.
native public  intdecrDoubleWord(String valueName)
     This method will decrement the value of a REG_DWORD value.
native public  voiddeleteSubKey(String subKey)
     Delete a named subkey.
native public  voiddeleteValue(String valueName)
     Delete a named value.
native public static  StringexpandEnvStrings(String exString)
     This method will expand a string to include the definitions of System environment variables that are referenced via the %variable% construct.
public  voidexport(PrintWriter out, boolean descend)
     Export this key's definition to the provided PrintWriter.
public  voidfinalize()
     The finalize() override checks to be sure the key is closed.
native public  voidflushKey()
     Guarentees that this key is written to disk.
native public  StringgetDefaultValue()
     Get the data from the default value.
public  StringgetFullName()
     Get the full name of the key, from the top level down.
native public  intgetMaxSubkeyLength()
     Obtains the maximum length of all of the subkey names.
native public  intgetMaxValueDataLength()
     Obtains the maximum length of all of the value data.
native public  intgetMaxValueNameLength()
     Obtains the maximum length of all of the value names.
public  StringgetName()
     Get the name of this key.
native public  intgetNumberSubkeys()
     Obtains the number of subkeys that this key contains.
native public  intgetNumberValues()
     Obtains the number of values that this key contains.
native public  StringgetStringValue(String valueName)
     Get the value of a REG_SZ or REG_EXPAND_SZ value.
Parameters:
  valueName - The name of the value to get.
native public  RegistryValuegetValue(String valueName)
     Get the data of a named value.
Parameters:
  valueName - The name of the value to get.
native public  booleanhasDefaultValue()
     Determines if this key has a default value.
native public  booleanhasOnlyDefaultValue()
     Determines if this key has only a default value.
native public  intincrDoubleWord(String valueName)
     This method will increment the value of a REG_DWORD value.
public  EnumerationkeyElements()
    
public  RegistryKeyopenSubKey(String subkey)
     Open a Registry subkey of this key with READ access.
Parameters:
  subkey - The name of the subkey to open.
native public  RegistryKeyopenSubKey(String subKey, int access)
     Open a Registry subkey of this key with the specified access.
Parameters:
  subkey - The name of the subkey to open.
Parameters:
  access - The access level for the open.
native public  StringregEnumKey(int index)
     Obtains an enumerator for the subkeys of this key.
native public  StringregEnumValue(int index)
     Obtains an enumerator for the values of this key.
public  voidsetCreated(boolean created)
     Used to set the created state of this key.
public  voidsetValue(RegistryValue value)
     Set the value of this RegistryKey.
native public  voidsetValue(String valueName, RegistryValue value)
     Set the name value to the given data.
public  EnumerationvalueElements()
    
public  booleanwasCreated()
     Determine if this key was opened or created and opened.

Field Detail
ACCESS_ALL
final public static int ACCESS_ALL(Code)



ACCESS_DEFAULT
final public static int ACCESS_DEFAULT(Code)
Constants used to determine the access level for newly opened keys.



ACCESS_EXECUTE
final public static int ACCESS_EXECUTE(Code)



ACCESS_READ
final public static int ACCESS_READ(Code)



ACCESS_WRITE
final public static int ACCESS_WRITE(Code)



created
protected boolean created(Code)
Used to indicate whether or not the key was created when method createSubKey() is called, otherwise false.



hKey
protected int hKey(Code)
This is the actual DWORD key that is returned from the Registry API. This value is totally opaque and should never be referenced.



name
protected String name(Code)
The full pathname of this key.




Constructor Detail
RegistryKey
public RegistryKey(int hKey, String name)(Code)



RegistryKey
public RegistryKey(int hKey, String name, boolean created)(Code)




Method Detail
closeKey
native public void closeKey() throws RegistryException(Code)
Closes this subkey. You may chose to let the finalize() method do the close.
exception:
  RegistryException - Any valid registry API error.



connectRegistry
native public RegistryKey connectRegistry(String hostName) throws NoSuchKeyException, RegistryException(Code)
Connect to the remote registry on hostName. This method will only work when invoked on a toplevel key. The returned value will be the same toplevel key opened from the remote host's registry.
Parameters:
  hostName - The remote computer's hostname. The remote top level key identical to this top level key.
exception:
  NoSuchKeyException - If the subkey does not exist.
exception:
  RegistryException - Any other registry API error.



createSubKey
public RegistryKey createSubKey(String subkey, String className) throws RegistryException(Code)
Create, and open, a Registry subkey of this key with WRITE access. If the key already exists, it is opened, otherwise it is first created and then opened.
Parameters:
  subkey - The name of the subkey to create.
Parameters:
  className - The className of the created subkey. The newly created and opened RegistryKey.
exception:
  RegistryException - Any valid registry API error.



createSubKey
native public RegistryKey createSubKey(String subKey, String className, int access) throws RegistryException(Code)
Create a new subkey, or open the existing one. You can determine if the subkey was created, or whether an existing subkey was opened, via the wasCreated() method.
Parameters:
  subKey - The name of the subkey to create/open.
Parameters:
  className - The key's class name, or null.
Parameters:
  access - The access level of the opened subkey. The newly created or opened subkey.
exception:
  RegistryException - Any valid registry API error.



decrDoubleWord
native public int decrDoubleWord(String valueName) throws NoSuchValueException, RegistryException(Code)
This method will decrement the value of a REG_DWORD value.
Parameters:
  valueName - The name of the value to increment.
exception:
  NoSuchValueException - If the value does not exist.
exception:
  RegistryException - Any other registry API error.



deleteSubKey
native public void deleteSubKey(String subKey) throws NoSuchKeyException, RegistryException(Code)
Delete a named subkey.
Parameters:
  subKey - The name of the subkey to delete.
exception:
  NoSuchKeyException - If the subkey does not exist.
exception:
  RegistryException - Any other registry API error.



deleteValue
native public void deleteValue(String valueName) throws NoSuchValueException, RegistryException(Code)
Delete a named value.
Parameters:
  valueName - The name of the value to delete.
exception:
  NoSuchValueException - If the value does not exist.
exception:
  RegistryException - Any other registry API error.



expandEnvStrings
native public static String expandEnvStrings(String exString)(Code)
This method will expand a string to include the definitions of System environment variables that are referenced via the %variable% construct. This method invokes EnvExpandStrings().
Parameters:
  valueName - The name of the value to increment.



export
public void export(PrintWriter out, boolean descend) throws NoSuchKeyException, RegistryException(Code)
Export this key's definition to the provided PrintWriter. The resulting file can be imported via RegEdit.
exception:
  NoSuchKeyException - Thrown by openSubKey().
exception:
  NoSuchValueException - Thrown by getValue().
exception:
  RegistryException - Any other registry API error.



finalize
public void finalize()(Code)
The finalize() override checks to be sure the key is closed.



flushKey
native public void flushKey() throws RegistryException(Code)
Guarentees that this key is written to disk. This method should be called only when needed, as it has a huge performance cost.
exception:
  RegistryException - Any valid registry API error.



getDefaultValue
native public String getDefaultValue() throws NoSuchValueException, RegistryException(Code)
Get the data from the default value. The string data of the default value.
exception:
  NoSuchValueException - If the value does not exist.
exception:
  RegistryException - Any other registry API error.



getFullName
public String getFullName()(Code)
Get the full name of the key, from the top level down. The full name of the key.



getMaxSubkeyLength
native public int getMaxSubkeyLength() throws RegistryException(Code)
Obtains the maximum length of all of the subkey names. The maximum length of all of the subkey names.
exception:
  RegistryException - Any valid registry API error.



getMaxValueDataLength
native public int getMaxValueDataLength() throws RegistryException(Code)
Obtains the maximum length of all of the value data. The maximum length of all of the value data.
exception:
  RegistryException - Any valid registry API error.



getMaxValueNameLength
native public int getMaxValueNameLength() throws RegistryException(Code)
Obtains the maximum length of all of the value names. The maximum length of all of the value names.
exception:
  RegistryException - Any valid registry API error.



getName
public String getName()(Code)
Get the name of this key. This is not fully qualified, which means that the name will not contain any backslashes. The relative name of this key.



getNumberSubkeys
native public int getNumberSubkeys() throws RegistryException(Code)
Obtains the number of subkeys that this key contains. The number of subkeys that this key contains.
exception:
  RegistryException - Any valid registry API error.



getNumberValues
native public int getNumberValues() throws RegistryException(Code)
Obtains the number of values that this key contains. The number of values that this key contains.
exception:
  RegistryException - Any valid registry API error.



getStringValue
native public String getStringValue(String valueName) throws NoSuchValueException, RegistryException(Code)
Get the value of a REG_SZ or REG_EXPAND_SZ value.
Parameters:
  valueName - The name of the value to get. The string data of the named value.
exception:
  NoSuchValueException - If the value does not exist.
exception:
  RegistryException - Any other registry API error.



getValue
native public RegistryValue getValue(String valueName) throws NoSuchValueException, RegistryException(Code)
Get the data of a named value.
Parameters:
  valueName - The name of the value to get. The data of the named value.
exception:
  NoSuchValueException - If the value does not exist.
exception:
  RegistryException - Any other registry API error.



hasDefaultValue
native public boolean hasDefaultValue() throws RegistryException(Code)
Determines if this key has a default value. True if there is a default value, else false.
exception:
  RegistryException - Any valid registry API error.



hasOnlyDefaultValue
native public boolean hasOnlyDefaultValue() throws RegistryException(Code)
Determines if this key has only a default value. True if there is only a default value, else false.
exception:
  RegistryException - Any valid registry API error.



incrDoubleWord
native public int incrDoubleWord(String valueName) throws NoSuchValueException, RegistryException(Code)
This method will increment the value of a REG_DWORD value.
Parameters:
  valueName - The name of the value to increment.
exception:
  NoSuchValueException - If the value does not exist.
exception:
  RegistryException - Any other registry API error.



keyElements
public Enumeration keyElements() throws RegistryException(Code)
Returns a new Enumeration that will enumerate the names of the subkeys of this key, A new Enumeration to enumerate subkey names.
exception:
  RegistryException - Any valid registry API error.



openSubKey
public RegistryKey openSubKey(String subkey) throws NoSuchKeyException, RegistryException(Code)
Open a Registry subkey of this key with READ access.
Parameters:
  subkey - The name of the subkey to open. The newly opened RegistryKey.
exception:
  NoSuchKeyException - If the subkey does not exist.
exception:
  RegistryException - Any other registry API error.



openSubKey
native public RegistryKey openSubKey(String subKey, int access) throws NoSuchKeyException, RegistryException(Code)
Open a Registry subkey of this key with the specified access.
Parameters:
  subkey - The name of the subkey to open.
Parameters:
  access - The access level for the open. The newly opened RegistryKey.
exception:
  NoSuchKeyException - If the subkey does not exist.
exception:
  RegistryException - Any other registry API error.



regEnumKey
native public String regEnumKey(int index) throws RegistryException(Code)
Obtains an enumerator for the subkeys of this key. The key enumerator.
exception:
  RegistryException - Any valid registry API error.



regEnumValue
native public String regEnumValue(int index) throws RegistryException(Code)
Obtains an enumerator for the values of this key. The value enumerator.
exception:
  RegistryException - Any valid registry API error.



setCreated
public void setCreated(boolean created)(Code)
Used to set the created state of this key.
Parameters:
  created - The new created state.



setValue
public void setValue(RegistryValue value) throws RegistryException(Code)
Set the value of this RegistryKey.
Parameters:
  value - The value to set, including the value name.
exception:
  RegistryException - Any valid registry API error.



setValue
native public void setValue(String valueName, RegistryValue value) throws RegistryException(Code)
Set the name value to the given data.
Parameters:
  valueName - The name of the value to set.
Parameters:
  value - The data to set the named value.
exception:
  RegistryException - Any valid registry API error.



valueElements
public Enumeration valueElements() throws RegistryException(Code)
Returns a new Enumeration that will enumerate the names of the values of this key, A new Enumeration to enumerate value names.
exception:
  RegistryException - Any valid registry API error.



wasCreated
public boolean wasCreated()(Code)
Determine if this key was opened or created and opened. The result can only be true if createSubKey() was called and the key did not exist, and the creation of the new subkey succeeded. True if the key was created new, else false.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.