|
|
@ -19,6 +19,7 @@ import java.io.IOException; |
|
|
|
import java.nio.file.Files; |
|
|
|
import java.nio.file.Files; |
|
|
|
import java.nio.file.Paths; |
|
|
|
import java.nio.file.Paths; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.regex.Matcher; |
|
|
|
import java.util.regex.Matcher; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
|
@ -52,12 +53,12 @@ public class PowersParser { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
String[] powerEntries = powerData.trim().split("\n"); |
|
|
|
String[] lineData = powerData.trim().split("\n"); |
|
|
|
ArrayList<String> powerHeader = new ArrayList<>(); |
|
|
|
ArrayList<String> powerHeader = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
// Parse header
|
|
|
|
// Parse header
|
|
|
|
|
|
|
|
|
|
|
|
String headerString = powerEntries[0]; |
|
|
|
String headerString = lineData[0]; |
|
|
|
headerString = headerString.replace("\n", " "); |
|
|
|
headerString = headerString.replace("\n", " "); |
|
|
|
|
|
|
|
|
|
|
|
Matcher matcher = STRSPLIT_REGEX.matcher(headerString); |
|
|
|
Matcher matcher = STRSPLIT_REGEX.matcher(headerString); |
|
|
@ -109,6 +110,9 @@ public class PowersParser { |
|
|
|
|
|
|
|
|
|
|
|
// Process key value pairs after header
|
|
|
|
// Process key value pairs after header
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iterator = Arrays.stream(lineData).iterator(); |
|
|
|
|
|
|
|
iterator.next(); // Ignore header
|
|
|
|
|
|
|
|
|
|
|
|
while (iterator.hasNext()) { |
|
|
|
while (iterator.hasNext()) { |
|
|
|
|
|
|
|
|
|
|
|
String lineValue = iterator.next(); |
|
|
|
String lineValue = iterator.next(); |
|
|
|