1 17 18 package org.apache.tomcat.jni; 19 20 25 26 public class Registry { 27 28 29 public static final int HKEY_CLASSES_ROOT = 1; 30 public static final int HKEY_CURRENT_CONFIG = 2; 31 public static final int HKEY_CURRENT_USER = 3; 32 public static final int HKEY_LOCAL_MACHINE = 4; 33 public static final int HKEY_USERS = 5; 34 35 public static final int KEY_ALL_ACCESS = 0x0001; 36 public static final int KEY_CREATE_LINK = 0x0002; 37 public static final int KEY_CREATE_SUB_KEY = 0x0004; 38 public static final int KEY_ENUMERATE_SUB_KEYS = 0x0008; 39 public static final int KEY_EXECUTE = 0x0010; 40 public static final int KEY_NOTIFY = 0x0020; 41 public static final int KEY_QUERY_VALUE = 0x0040; 42 public static final int KEY_READ = 0x0080; 43 public static final int KEY_SET_VALUE = 0x0100; 44 public static final int KEY_WOW64_64KEY = 0x0200; 45 public static final int KEY_WOW64_32KEY = 0x0400; 46 public static final int KEY_WRITE = 0x0800; 47 48 public static final int REG_BINARY = 1; 49 public static final int REG_DWORD = 2; 50 public static final int REG_EXPAND_SZ = 3; 51 public static final int REG_MULTI_SZ = 4; 52 public static final int REG_QWORD = 5; 53 public static final int REG_SZ = 6; 54 55 62 public static native long create(int root, String name, int sam, long pool) 63 throws Error ; 64 65 72 public static native long open(int root, String name, int sam, long pool) 73 throws Error ; 74 75 79 public static native int close(long key); 80 81 87 public static native int getType(long key, String name); 88 89 95 public static native int getValueI(long key, String name) 96 throws Error ; 97 98 104 public static native long getValueJ(long key, String name) 105 throws Error ; 106 107 113 public static native int getSize(long key, String name); 114 115 121 public static native String getValueS(long key, String name) 122 throws Error ; 123 124 130 public static native String [] getValueA(long key, String name) 131 throws Error ; 132 133 139 public static native byte[] getValueB(long key, String name) 140 throws Error ; 141 142 143 150 public static native int setValueI(long key, String name, int val); 151 152 159 public static native int setValueJ(long key, String name, int val); 160 161 168 public static native int setValueS(long key, String name, String val); 169 170 177 public static native int setValueE(long key, String name, String val); 178 179 186 public static native int setValueA(long key, String name, String [] val); 187 188 195 public static native int setValueB(long key, String name, byte[] val); 196 197 203 public static native String [] enumKeys(long key) 204 throws Error ; 205 206 212 public static native String [] enumValues(long key) 213 throws Error ; 214 215 221 public static native int deleteValue(long key, String name); 222 223 231 public static native int deleteKey(int root, String name, 232 boolean onlyIfEmpty); 233 234 235 } 236 | Popular Tags |