You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
649 B
22 lines
649 B
import java.io.FileReader;
|
|
import java.util.Arrays;
|
|
import java.util.Properties;
|
|
|
|
public class BordComputer {
|
|
|
|
String[] deviceNames;
|
|
|
|
public void readConfig() {
|
|
|
|
try (FileReader reader = new FileReader("Geraete.config")) {
|
|
Properties properties = new Properties();
|
|
properties.load(reader);
|
|
String[] values = properties.values().toArray(new String[0]);
|
|
Arrays.sort(values);
|
|
deviceNames = new String[values.length];
|
|
System.arraycopy(values, 0, deviceNames, 0, properties.size());
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|