1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-19 09:42:11 +03:00

Windows: got rid on JNA, thus no more UnsatisfiedLinkError (at least when accessing native OS functions). Fixes #3190

This commit is contained in:
Federico Fissore
2015-05-20 16:13:48 +02:00
parent 026210564d
commit f6546aea45
31 changed files with 109 additions and 1199 deletions

View File

@ -0,0 +1,35 @@
package processing.app.windows;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import java.util.Arrays;
import java.util.List;
public class RegQueryParser {
private String valueOfKey;
public RegQueryParser(String regQueryOutput) {
parse(regQueryOutput);
}
private void parse(String regQueryOutput) {
List<String> rows = Arrays.asList(regQueryOutput.replace("\r", "\n").replace("\n\n", "\n").split("\n"));
String row = Iterables.find(rows, new Predicate<String>() {
@Override
public boolean apply(String input) {
return input.startsWith(" ");
}
});
String[] cols = row.split(" ");
assert cols.length == 4;
this.valueOfKey = cols[3];
}
public String getValueOfKey() {
return valueOfKey;
}
}