-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.java
More file actions
39 lines (23 loc) · 881 Bytes
/
test.java
File metadata and controls
39 lines (23 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package projTryouts;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class test {
private List<String> orderUpdateTokenizer(String telegramString, String lineFeed, String carriageReturn) {
List<String> tokenz = new ArrayList<String>();
// split upon linefeed delimiter
String[] s = telegramString.split(lineFeed, -1);
String[] telegramData = s[1].split(carriageReturn, -1);
tokenz.addAll(Arrays.asList(s[0].split("\\|", -1)));
tokenz.addAll(Arrays.asList(telegramData[0].split("\\|", -1)));
return tokenz;
}
public test(String s) {
for (String e : this.orderUpdateTokenizer(s, "<LF>", "<CR>"))
System.out.println(e);
}
public static void main(String[] args) {
String s = "ORUPDT|REQ|203fe519-a473-5b7f-bdf2-ef86aa01510a|famprixwms<LF>7454445551|1234|IBUPROFEN |MANUAL|10|MAN005<CR>";
new test(s);
}
}