public class LogContent
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
LogContent |
ansiCharsToColorText()
Returns a copy of this log content with ANSI control characters interpreted to produce plain text with text attributes included.
|
LogContent |
ansiCharsToPlainText()
Returns a copy of this log content with ANSI control characters interpreted to produce plain text.
|
int |
countMatches(java.util.regex.Pattern pattern)
Returns the number of lines that match the given pattern.
|
LogContent |
drop(int i)
Drops the first n lines.
|
void |
eachLine(java.util.function.Consumer<? super java.lang.String> action)
Visits each line in this content.
|
static LogContent |
empty() |
java.util.List<java.lang.String> |
getLines()
Returns this content separated into lines.
|
static LogContent |
of(java.util.List<java.lang.String> lines)
Creates a new instance from a sequence of lines (without the line separators).
|
static LogContent |
of(java.lang.String chars)
Creates a new instance, from raw characters.
|
LogContent |
removeDebugPrefix()
Returns a copy of this log content with the debug prefix removed.
|
Pair<LogContent,LogContent> |
splitOnFirstMatchingLine(java.util.regex.Pattern pattern)
Locates the log content starting with the first line that matches the given pattern, or null if no such line.
|
static java.lang.String |
stripJavaIllegalAccessWarnings(java.lang.String result) |
java.lang.String |
toString()
Does not return the text of this content.
|
java.lang.String |
withNormalizedEol()
Returns this content formatted using a new line char to separate lines.
|
public static LogContent of(java.lang.String chars)
public static LogContent of(java.util.List<java.lang.String> lines)
public static LogContent empty()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String withNormalizedEol()
public java.util.List<java.lang.String> getLines()
public void eachLine(java.util.function.Consumer<? super java.lang.String> action)
@Nullable public Pair<LogContent,LogContent> splitOnFirstMatchingLine(java.util.regex.Pattern pattern)
public int countMatches(java.util.regex.Pattern pattern)
public LogContent drop(int i)
public LogContent removeDebugPrefix()
public LogContent ansiCharsToPlainText()
public LogContent ansiCharsToColorText()
public static java.lang.String stripJavaIllegalAccessWarnings(java.lang.String result)