(String pwd)
| 9 | |
| 10 | public class printResult { |
| 11 | public static String[] dataArray(String pwd){ |
| 12 | String[] dataArray = new String[100000]; |
| 13 | int index = 0; |
| 14 | try (BufferedReader reader = new BufferedReader(new FileReader(pwd))) { |
| 15 | StringBuilder sb = new StringBuilder(); |
| 16 | String line; |
| 17 | while ((line = reader.readLine()) != null) { |
| 18 | if (line.startsWith("@@") && sb.length() > 0) { |
| 19 | dataArray[index] = sb.toString().replace("@@","").trim(); |
| 20 | sb.setLength(0); |
| 21 | index++; |
| 22 | } else { |
| 23 | sb.append(line).append("\n"); |
| 24 | } |
| 25 | } |
| 26 | if (sb.length() > 0) { |
| 27 | dataArray[index] = sb.toString().replace("@@","").trim(); |
| 28 | } |
| 29 | } catch (IOException e) { |
| 30 | e.printStackTrace(); |
| 31 | } |
| 32 | return dataArray; |
| 33 | } |
| 34 | |
| 35 | public static String flag(Boolean f){ |
| 36 | if(f){ |
no outgoing calls
no test coverage detected