types: '<': parse to any token (for nextToken ()) '"': parse to quote ' ': parse to whitespace or '>'
(int delimiter, boolean resolveEntities)
| 787 | */ |
| 788 | |
| 789 | private final void pushText(int delimiter, boolean resolveEntities) |
| 790 | throws IOException, XmlPullParserException { |
| 791 | |
| 792 | int next = peek(0); |
| 793 | int cbrCount = 0; |
| 794 | |
| 795 | while (next != -1 && next != delimiter) { // covers eof, '<', '"' |
| 796 | |
| 797 | if (delimiter == ' ') |
| 798 | if (next <= ' ' || next == '>') |
| 799 | break; |
| 800 | |
| 801 | if (next == '&') { |
| 802 | if (!resolveEntities) |
| 803 | break; |
| 804 | |
| 805 | pushEntity(); |
| 806 | } |
| 807 | else if (next == '\n' && type == START_TAG) { |
| 808 | read(); |
| 809 | push(' '); |
| 810 | } |
| 811 | else |
| 812 | push(read()); |
| 813 | |
| 814 | if (next == '>' && cbrCount >= 2 && delimiter != ']') |
| 815 | error("Illegal: ]]>"); |
| 816 | |
| 817 | if (next == ']') |
| 818 | cbrCount++; |
| 819 | else |
| 820 | cbrCount = 0; |
| 821 | |
| 822 | next = peek(0); |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | private final void read(char c) |
| 827 | throws IOException, XmlPullParserException { |
no test coverage detected