1 | public int read() throws IOException {↵ | | 1 | public int read() throws IOException {↵
|
2 | if (!getInitialized()) {↵ | | 2 | if (!getInitialized()) {↵
|
3 | initialize();↵ | | 3 | initialize();↵
|
4 | setInitialized(true);↵ | | 4 | setInitialized(true);↵
|
5 | }↵ | | 5 | }↵
|
|
6 | while (line == null || line.length() == 0) {↵ | | 6 | while (line == null || line.length() == 0) {↵
|
7 | line = lineTokenizer.getToken(in);↵ | | 7 | line = lineTokenizer.getToken(in);↵
|
| | | 8 | line = tailFilter(line);↵
|
8 | if (line == null) {↵ | | 9 | if (line == null) {↵
|
9 | return -1;↵ | | 10 | return -1;↵
|
10 | }↵ | | 11 | }↵
|
11 | line = headFilter(line);↵ | | |
|
12 | linePos = 0;↵ | | 12 | linePos = 0;↵
|
13 | }↵ | | 13 | }↵
|
|
14 | int ch = line.charAt(linePos);↵ | | 14 | int ch = line.charAt(linePos);↵
|
15 | linePos++;↵ | | 15 | linePos++;↵
|
16 | if (linePos == line.length()) {↵ | | 16 | if (linePos == line.length()) {↵
|
17 | line = null;↵ | | 17 | line = null;↵
|
18 | }↵ | | 18 | }↵
|
19 | return ch;↵ | | 19 | return ch;↵
|
20 | | | 20 |
|