Reads newline-terminated lines from a stream at the byte level (not readLine(), which would buffer a line of any length): a line is capped at maxLineBytes and must be finished within lineDeadlineMillis of its first byte, so a server can neither fill the memory nor keep the reader busy with a line that never ends.
More...
Reads newline-terminated lines from a stream at the byte level (not readLine(), which would buffer a line of any length): a line is capped at maxLineBytes and must be finished within lineDeadlineMillis of its first byte, so a server can neither fill the memory nor keep the reader busy with a line that never ends.
◆ readLine()
| byte[] de.yaacc.snapcast.control.SnapcastLineReader.readLine |
( |
| ) |
throws IOException, SnapcastException |
- Returns
- the next line without its terminator (
\n or \r\n), or null at the end of the stream (a last line without a terminator is dropped)
- Exceptions
-
| SocketTimeoutException | when nothing arrived within the read timeout and no line is under way (idle) |
| SnapcastException | LIMIT when the line is longer than the cap; TIMEOUT when a line under way stalls or takes longer than the deadline |
| IOException | the stream failed |
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/snapcast/control/SnapcastLineReader.java