gnu.text
Class WriterManager
- Runnable
public class WriterManager
extends java.lang.Object
implements Runnable
Manages a collection of Writers, handling automatic closing.
This class is useful for making sure that a Writer closed (and its
buffers flushed) when a VM exits.
A WriterManager can be usefully passed to the JDK 1.3 method
addShutdownHook in Runtime.
register
public int register(Writer port)
registerShutdownHook
public boolean registerShutdownHook()
Try to register this as a shutdown hook.
- true on success; false if failure (e.g. if not JDK1.3-compatible).
unregister
public void unregister(int index)