Skip to content

Commit

Permalink
fix doc doc
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Jul 5, 2024
1 parent 7037aad commit fcd11c4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/org/cryptomator/windows/common/RegistryKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ public class RegistryKey implements AutoCloseable {

/**
* Gets a REG_SZ or REG_EXPAND_SZ value.
* <p>
* The size of the data is restricted to at most {@value MAX_DATA_SIZE}. If the the value exceeds the size, a runtime exception is thrown.
*
* @param name name of the value
* @param isExpandable flag indicating if the value is of type REG_EXPAND_SZ
* @return the data of the value
* @throws RegistryValueException, if winreg.h:RegGetValueW returns a result != ERROR_SUCCESS
* @implNote This method is restricted to read at most {@value MAX_DATA_SIZE} from the registry. If the value exceeds the size, a runtime exception is thrown.
* @throws RegistryValueException if winreg.h:RegGetValueW returns a result != ERROR_SUCCESS
*/
public String getStringValue(String name, boolean isExpandable) throws RegistryValueException {
try (var arena = Arena.ofConfined()) {
Expand All @@ -57,7 +58,7 @@ public String getStringValue(String name, boolean isExpandable) throws RegistryV
*
* @param name name of the value
* @return the data of the value
* @throws RegistryValueException, if winreg.h:RegGetValueW returns a result != ERROR_SUCCESS
* @throws RegistryValueException if winreg.h:RegGetValueW returns a result != ERROR_SUCCESS
*/
public int getDwordValue(String name) throws RegistryValueException {
try (var arena = Arena.ofConfined()) {
Expand Down Expand Up @@ -100,7 +101,7 @@ private MemorySegment getValue(Arena arena, String name, int dwFlags) throws Reg
* @param name name of the value
* @param data Data to be set
* @param isExpandable flag marking if the value is of type REG_EXPAND_SZ
* @throws RegistryValueException, if winreg.h:RegSetKeyValueW returns a result != ERROR_SUCCESS
* @throws RegistryValueException if winreg.h:RegSetKeyValueW returns a result != ERROR_SUCCESS
*/
public void setStringValue(String name, String data, boolean isExpandable) throws RegistryValueException {
try (var arena = Arena.ofConfined()) {
Expand All @@ -115,7 +116,7 @@ public void setStringValue(String name, String data, boolean isExpandable) throw
*
* @param name name of the value
* @param data Data to be set
* @throws RegistryValueException, if winreg.h:RegSetKeyValueW returns a result != ERROR_SUCCESS
* @throws RegistryValueException if winreg.h:RegSetKeyValueW returns a result != ERROR_SUCCESS
*/
public void setDwordValue(String name, int data) throws RegistryValueException {
try (var arena = Arena.ofConfined()) {
Expand All @@ -142,7 +143,7 @@ private void setValue(MemorySegment lpValueName, MemorySegment data, int dwFlags
* Deletes a value of this registry key.
*
* @param valueName name of the value
* @throws RegistryValueException, if winreg.h:RegDeleteKeyValueW returns a result != ERROR_SUCCESS
* @throws RegistryValueException if winreg.h:RegDeleteKeyValueW returns a result != ERROR_SUCCESS
* @see RegistryKey#deleteValue(String, boolean)
*/
public void deleteValue(String valueName) throws RegistryValueException {
Expand All @@ -154,7 +155,7 @@ public void deleteValue(String valueName) throws RegistryValueException {
*
* @param valueName name of the value
* @param ignoreNotExisting flag indicating wether a not existing value should be ignored
* @throws RegistryValueException, if winreg.h:RegDeleteKeyValueW returns a result != ERROR_SUCCESS, <em>except</em> the result is ERROR_FILE_NOT_FOUND and {@code ignoreNotExisting == true}
* @throws RegistryValueException if winreg.h:RegDeleteKeyValueW returns a result != ERROR_SUCCESS, <em>except</em> the result is ERROR_FILE_NOT_FOUND and {@code ignoreNotExisting == true}
*/
public void deleteValue(String valueName, boolean ignoreNotExisting) throws RegistryValueException {
try (var arena = Arena.ofConfined()) {
Expand All @@ -174,7 +175,7 @@ public void deleteValue(String valueName, boolean ignoreNotExisting) throws Regi
* If an empty string or {@code null} is specified as the subkey, this method deletes <em>all subtrees and values</em> of this registry key.
*
* @param subkey Name of the subkey, being the root of the subtree to be deleted. Can be {@code null} or empty.
* @throws RegistryKeyException, if winreg.h:RegDeleteTreeW returns a result != ERROR_SUCCESS
* @throws RegistryKeyException if winreg.h:RegDeleteTreeW returns a result != ERROR_SUCCESS
*/
public void deleteTree(String subkey) throws RegistryKeyException {
try (var arena = Arena.ofConfined()) {
Expand Down

0 comments on commit fcd11c4

Please sign in to comment.