org.melati.util
Class MelatiWriter

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

public abstract class MelatiWriter
extends java.io.Writer

An abstract Writer for objects that output from Melati.


Field Summary
protected  boolean flush
           
protected  java.io.Writer out
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
MelatiWriter()
           
 
Method Summary
 void close()
          
 void flush()
          
 java.io.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(java.lang.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 java.io.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 java.io.IOException

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

write

public void write(java.lang.String string)
           throws java.io.IOException

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

startFlushing

protected void startFlushing()

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
See Also:
Writer.flush()

reset

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

Throws:
java.io.IOException - in some implementations

close

public void close()
           throws java.io.IOException

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

getWriter

public java.io.Writer getWriter()
Returns:
the output Writer


Copyright © 2000-2009 PanEris. All Rights Reserved.