public String getSystemStatus() { return systemStatus.toString(); }
public String getDescription() { return description.toString(); }
/** * Enumerates the values of the specified open key. Retrieves the name and * data for one value each time it is called. */ public Map.Entry<String, String> wfmEnumValue(final HKEY hKey, final DWORD iValue) throws XfsException { ZSTR value = new ZSTR(SIZE_LIMIT, true); ZSTR data = new ZSTR(SIZE_LIMIT, true); DWORD cchValue = new DWORD(SIZE_LIMIT); DWORD cchData = new DWORD(SIZE_LIMIT); final int errorCode = wfmEnumValue0(hKey, iValue, value, cchValue, data, cchData); XfsException.throwFor(errorCode); return new ValuePair(value.toString(), data.toString()); }
/** * Enumerates the subkeys of the specified open key. Retrieves information * about one subkey each time it is called. * * @param key * Handle to a currently open key, or the predefined handle * value: {@link #WFS_CFG_HKEY_XFS_ROOT} * @return the name of the subkey */ public String wfmEnumKey(final HKEY key, final DWORD iSubKey) throws XfsException { final ZSTR name = new ZSTR(SIZE_LIMIT, true); DWORD cchName = new DWORD(name.length); FILETIME lastWrite = new FILETIME(); final int errorCode = wfmEnumKey0(key, iSubKey, name, cchName, lastWrite); XfsException.throwFor(errorCode); return name.toString(); }
/** * Retrieves the data for the value with the specified name, within the * specified open key. */ public String wfmQueryValue(final HKEY hKey, final String valueName) throws XfsException { final ZSTR data = new ZSTR(SIZE_LIMIT, true); final DWORD cchData = new DWORD(data.getSize()); final int errorCode = wfmQueryValue0(hKey, new ZSTR(valueName), data, cchData); XfsException.throwFor(errorCode); return data.toString(); }
@Test public final void helloWorld() { final String expected = "Hello World!"; ZSTR zString = new ZSTR(expected); Assert.assertEquals(expected, zString.toString()); } }