org.ujmp.core.util.io
Class IntelligentFileWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.ujmp.core.util.io.IntelligentFileWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class IntelligentFileWriter
extends Writer
implements Appendable, Closeable, Flushable


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
IntelligentFileWriter(File file)
           
IntelligentFileWriter(File file, boolean append)
           
IntelligentFileWriter(OutputStream outputStream)
           
IntelligentFileWriter(String filename)
           
IntelligentFileWriter(String filename, boolean append)
           
 
Method Summary
static void append(String filename, String text)
           
 void close()
           
 void flush()
           
static void save(String filename, String text)
           
 void write(char[] cbuf, int off, int len)
           
static void write(OutputStream os, 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
 

Constructor Detail

IntelligentFileWriter

public IntelligentFileWriter(String filename)
                      throws IOException,
                             ClassNotFoundException
Throws:
IOException
ClassNotFoundException

IntelligentFileWriter

public IntelligentFileWriter(String filename,
                             boolean append)
                      throws IOException,
                             ClassNotFoundException
Throws:
IOException
ClassNotFoundException

IntelligentFileWriter

public IntelligentFileWriter(OutputStream outputStream)
                      throws IOException
Throws:
IOException

IntelligentFileWriter

public IntelligentFileWriter(File file)
                      throws IOException
Throws:
IOException

IntelligentFileWriter

public IntelligentFileWriter(File file,
                             boolean append)
                      throws IOException
Throws:
IOException
Method Detail

save

public static final void save(String filename,
                              String text)
                       throws Exception
Throws:
Exception

append

public static final void append(String filename,
                                String text)
                         throws Exception
Throws:
Exception

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

write

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

write

public static void write(OutputStream os,
                         String text)


Copyright © 2010. All Rights Reserved.