Reads a log stream but keeps only its last lines, each cut to a maximum length, so that a large logcat buffer (several MB, e.g.
More...
|
| static String | read (BufferedReader reader, int maxLines, int maxLineChars) throws IOException |
| |
Reads a log stream but keeps only its last lines, each cut to a maximum length, so that a large logcat buffer (several MB, e.g.
after a flood of stack traces) cannot freeze the log viewer: memory, text comparison and text layout stay bounded. Plain JVM.
◆ read()
| static String de.yaacc.util.LogTail.read |
( |
BufferedReader | reader, |
|
|
int | maxLines, |
|
|
int | maxLineChars ) throws IOException |
|
static |
- Parameters
-
| reader | the stream to read to its end |
| maxLines | the number of last lines to keep, at least 1 |
| maxLineChars | the longest line kept; longer lines end with an ellipsis |
- Returns
- the kept lines, each followed by a line feed; empty if there was no line
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/util/LogTail.java