+ }
+
+ public static int[] getMID (int num_threads) {
+ int[] mid = new int[num_threads];
+
+ FileInputStream ifs = new FileInputStream("dstm.conf");
+ String str;
+ String sub;
+ int fromIndex;
+ int endIndex;
+ double num;
+
+ for (int i = 0; i < num_threads; i++) {
+ int power = 3 - i;
+ fromIndex = 0;
+ num = 0;
+
+ str = ifs.readLine();
+
+ endIndex = str.indexOf('.', fromIndex);
+ sub = str.subString(fromIndex, endIndex);
+ num += (Integer.parseInt(sub) << 24);
+
+ fromIndex = endIndex + 1;
+ endIndex = str.indexOf('.', fromIndex);
+ sub = str.subString(fromIndex, endIndex);
+ num += (Integer.parseInt(sub) << 16);
+
+ fromIndex = endIndex + 1;
+ endIndex = str.indexOf('.', fromIndex);
+ sub = str.subString(fromIndex, endIndex);
+ num += (Integer.parseInt(sub) << 8);