Extract a string stopping at control characters or any character in delim.
(String delim)
| 262 | * character in delim. |
| 263 | */ |
| 264 | private String readDelimString(String delim) { |
| 265 | skipSpaces(); |
| 266 | |
| 267 | if (index >= size) // already at end of response |
| 268 | return null; |
| 269 | |
| 270 | int b; |
| 271 | int start = index; |
| 272 | while (index < size && ((b = (((int)buffer[index])&0xff)) >= ' ') && |
| 273 | delim.indexOf((char)b) < 0 && b != 0x7f) |
| 274 | index++; |
| 275 | |
| 276 | return toString(buffer, start, index); |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * Read a string as an arbitrary sequence of characters, |
no test coverage detected