YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.util.LogTail Class Reference

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...

Collaboration diagram for de.yaacc.util.LogTail:
Collaboration graph

Static Public Member Functions

static String read (BufferedReader reader, int maxLines, int maxLineChars) throws IOException
 

Detailed Description

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.

Member Function Documentation

◆ read()

static String de.yaacc.util.LogTail.read ( BufferedReader reader,
int maxLines,
int maxLineChars ) throws IOException
static
Parameters
readerthe stream to read to its end
maxLinesthe number of last lines to keep, at least 1
maxLineCharsthe 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: