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 charprivate final StringBuilderprivate final intprivate final Stringprivate 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:
writein classWriter- Throws:
IOException
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
completeLine
Complete the current line (emit LF if not at the start of the line already).- Throws:
IOException
-