org.melati.util
Class MelatiWriter

Package class diagram package MelatiWriter
java.lang.Object
  extended by java.io.Writer
      extended by org.melati.util.MelatiWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
MelatiBufferedWriter, MelatiFastWriter, MelatiSimpleWriter, MelatiStringWriter, MelatiVelocityWriter

public abstract class MelatiWriter
extends Writer

An abstract Writer for objects that output from Melati.


Field Summary
protected  boolean flush
           
protected  Writer out
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
MelatiWriter()
           
 
Method Summary
 void close()
          
 void flush()
          
 Writer getWriter()
           
 void reset()
          Do nothing in the unbuffered case.
 void setFlushingOn()
          Set flushing true.
protected  void startFlushing()
           
 void write(char[] cbuf, int off, int len)
          
 void write(String string)
          
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected Writer out

flush

protected boolean flush
Constructor Detail

MelatiWriter

public MelatiWriter()
Method Detail

setFlushingOn

public void setFlushingOn()
Set flushing true.


write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException

Specified by:
write in class Writer
Throws:
IOException
See Also:
Writer.write(char[], int, int)

write

public void write(String string)
           throws IOException

Overrides:
write in class Writer
Throws:
IOException
See Also:
Writer.write(java.lang.String)

startFlushing

protected void startFlushing()

flush

public void flush()
           throws IOException

Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException
See Also:
Writer.flush()

reset

public void reset()
           throws IOException
Do nothing in the unbuffered case.

Throws:
IOException - in some implementations

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException
See Also:
Writer.close()

getWriter

public Writer getWriter()
Returns:
the output Writer


Copyright © 2000-2010 PanEris. All Rights Reserved.