Class CachedOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class CachedOutputStream
    extends BufferedOutputStream
    CachedOutputStream buffers the stream while ignoring flushing. The content is flushed only upon close, so REMEMBER TO CLOSE IT. The purpose is to work around networked file systems which tend to flush too often and result in unbearably poor performance. Example: Microsoft DFS takes ~45s to save 65K xml document.
    Author:
    marius