MCPcopy Create free account
hub / github.com/R4gd0ll/LazyAnFuZai / dataArray

Method dataArray

src/main/java/System/printResult.java:11–33  ·  view source on GitHub ↗
(String pwd)

Source from the content-addressed store, hash-verified

9
10public 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){

Callers 2

loginCheckMethod · 0.80
submitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected