org.melati.template.velocity
Class MelatiVelocityWriter

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

public class MelatiVelocityWriter
extends MelatiWriter

This provides an interface for objects that output from melati.


Field Summary
protected  OutputStream outputStream
           
 
Fields inherited from class org.melati.util.MelatiWriter
flush, out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
MelatiVelocityWriter(javax.servlet.http.HttpServletResponse response)
          Constructor.
MelatiVelocityWriter(OutputStream output, String encoding)
          Constructor.
 
Method Summary
 void close()
          
 org.apache.velocity.io.VelocityWriter getVelocityWriter()
          As we can write to the underlying peer the Flusher may not get started so we should start it here.
 
Methods inherited from class org.melati.util.MelatiWriter
flush, getWriter, reset, setFlushingOn, startFlushing, write, write
 
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

outputStream

protected OutputStream outputStream
Constructor Detail

MelatiVelocityWriter

public MelatiVelocityWriter(javax.servlet.http.HttpServletResponse response)
                     throws IOException
Constructor.

Parameters:
response - the response to write to
Throws:
IOException - if getOutputStream throws one

MelatiVelocityWriter

public MelatiVelocityWriter(OutputStream output,
                            String encoding)
Constructor.

Parameters:
output - OutputStream to write to
encoding - character encoding to use
Throws:
IOException - if getOutputStream throws one
Method Detail

getVelocityWriter

public org.apache.velocity.io.VelocityWriter getVelocityWriter()
As we can write to the underlying peer the Flusher may not get started so we should start it here.

Returns:
the underlying output

close

public void close()
           throws IOException

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


Copyright © 2000-2010 PanEris. All Rights Reserved.