Class PrefixedWriter
java.lang.Object
java.io.Writer
com.carrotsearch.ant.tasks.junit4.listeners.PrefixedWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Prefixes every new line with a given byte [], synchronizing multiple streams to emit consistent lines.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char
private final StringBuilder
private final int
private final String
private final Writer
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LF
private static final char LF- See Also:
-
sink
-
prefix
-
lineBuffer
-
maxLineLength
private final int maxLineLength
-
-
Constructor Details
-
PrefixedWriter
-
-
Method Details
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
completeLine
Complete the current line (emit LF if not at the start of the line already).- Throws:
IOException
-