Consume characters that need no special handling within a JSON string, appending them to the supplied builder in bulk. Stops before the next '"', '\\', or control character, which is left unconsumed. @param sink StringBuilder that accumulates the string body @return the unconsumed special c
(StringBuilder sink)
| 153 | * is exhausted |
| 154 | */ |
| 155 | public int appendStringContent(StringBuilder sink) { |
| 156 | while (fill()) { |
| 157 | int start = position + 1; |
| 158 | for (int i = start; i < filled; i++) { |
| 159 | char c = buffer[i]; |
| 160 | if (c == '"' || c == '\\' || c < 0x20) { |
| 161 | sink.append(buffer, start, i - start); |
| 162 | position = i - 1; |
| 163 | return c; |
| 164 | } |
| 165 | } |
| 166 | sink.append(buffer, start, filled - start); |
| 167 | position = filled - 1; |
| 168 | } |
| 169 | |
| 170 | return EOF; |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Consume whitespace characters in bulk, leaving the first non-whitespace character unconsumed. |
no test coverage detected