MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / pushText

Method pushText

src/org/kxml2/io/KXmlParser.java:789–824  ·  view source on GitHub ↗

types: '<': parse to any token (for nextToken ()) '"': parse to quote ' ': parse to whitespace or '>'

(int delimiter, boolean resolveEntities)

Source from the content-addressed store, hash-verified

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 {

Callers 2

nextImplMethod · 0.95
parseStartTagMethod · 0.95

Calls 5

peekMethod · 0.95
pushEntityMethod · 0.95
readMethod · 0.95
pushMethod · 0.95
errorMethod · 0.95

Tested by

no test coverage detected