Class CachingWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public class CachingWriter
    extends java.io.OutputStreamWriter
    Caching Writer to avoid overwriting a file with the same content.
    • Field Summary

      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      CachingWriter​(java.io.File path, java.nio.charset.Charset charset)  
      CachingWriter​(java.nio.file.Path path, java.nio.charset.Charset charset)  
      CachingWriter​(java.nio.file.Path path, java.nio.charset.Charset charset, int bufferSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isModified()  
      • Methods inherited from class java.io.OutputStreamWriter

        append, append, close, flush, getEncoding, write, write, write
      • Methods inherited from class java.io.Writer

        append, nullWriter, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CachingWriter

        public CachingWriter​(java.io.File path,
                             java.nio.charset.Charset charset)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • CachingWriter

        public CachingWriter​(java.nio.file.Path path,
                             java.nio.charset.Charset charset)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • CachingWriter

        public CachingWriter​(java.nio.file.Path path,
                             java.nio.charset.Charset charset,
                             int bufferSize)
                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • isModified

        public boolean isModified()