Class IntelligentFileWriter

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

    public class IntelligentFileWriter
    extends java.io.Writer
    implements java.lang.Appendable, java.io.Closeable, java.io.Flushable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.BufferedWriter bw  
      private java.lang.String encoding  
      private java.io.FileWriter fw  
      private static java.lang.String SEVENZIPOUTPUTSTREAM  
      private java.io.OutputStream zip  
      • Fields inherited from class java.io.Writer

        lock
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void append​(java.lang.String filename, java.lang.String text)  
      void close()  
      void flush()  
      static void save​(java.io.File file, java.lang.String text)  
      static void save​(java.lang.String filename, java.lang.String text)  
      void write​(char[] cbuf, int off, int len)  
      static void write​(java.io.OutputStream os, java.lang.String text)  
      • Methods inherited from class java.io.Writer

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Appendable

        append, append, append
    • Field Detail

      • SEVENZIPOUTPUTSTREAM

        private static final java.lang.String SEVENZIPOUTPUTSTREAM
        See Also:
        Constant Field Values
      • fw

        private java.io.FileWriter fw
      • zip

        private java.io.OutputStream zip
      • bw

        private java.io.BufferedWriter bw
      • encoding

        private java.lang.String encoding
    • Constructor Detail

      • IntelligentFileWriter

        public IntelligentFileWriter​(java.lang.String filename)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • IntelligentFileWriter

        public IntelligentFileWriter​(java.lang.String filename,
                                     boolean append)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • IntelligentFileWriter

        public IntelligentFileWriter​(java.io.OutputStream outputStream)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • IntelligentFileWriter

        public IntelligentFileWriter​(java.io.File file)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • IntelligentFileWriter

        public IntelligentFileWriter​(java.io.File file,
                                     boolean append)
                              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • save

        public static final void save​(java.lang.String filename,
                                      java.lang.String text)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • save

        public static final void save​(java.io.File file,
                                      java.lang.String text)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • append

        public static final void append​(java.lang.String filename,
                                        java.lang.String text)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Writer
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public void write​(char[] cbuf,
                          int off,
                          int len)
                   throws java.io.IOException
        Specified by:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public static void write​(java.io.OutputStream os,
                                 java.lang.String text)