Package monq.jfa.ooo

Class ContextBufferingWriter

java.lang.Object
java.io.Writer
monq.jfa.ooo.ContextBufferingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public final class ContextBufferingWriter extends Writer
A writer which keeps a pre- and and a post-context of a marked "line" and writes the "line" out in the context as soon as the required context has been seen. If contexts overlap, the overlapping parts are written for each marked line.

NOTE: this class is mainly final because of "Final classes are immune to finalizer attacks..." from Effective java, Item 8.