org.norther.tammi.spray.filter.chain
Class ServletOutputStreamWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.OutputStreamWriter
          extended by org.norther.tammi.spray.filter.chain.ServletOutputStreamWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class ServletOutputStreamWriter
extends OutputStreamWriter

A servlet output stream writer supporting a flush callback.

Note that the wrapped stream is not closed by the close method of this stream.

Author:
Ilkka Priha

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ServletOutputStreamWriter(ServletOutputStreamWrapper out)
          Constructs a new writer.
ServletOutputStreamWriter(ServletOutputStreamWrapper out, String encoding)
          Constructs a new writer with encoding.
 
Method Summary
 void close()
          Marks the stream closed before flushing it.
 
Methods inherited from class java.io.OutputStreamWriter
flush, getEncoding, write, write, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletOutputStreamWriter

public ServletOutputStreamWriter(ServletOutputStreamWrapper out)
Constructs a new writer.

Parameters:
out - the output stream.

ServletOutputStreamWriter

public ServletOutputStreamWriter(ServletOutputStreamWrapper out,
                                 String encoding)
                          throws UnsupportedEncodingException
Constructs a new writer with encoding.

Parameters:
out - the output stream.
encoding - the character encoding.
Throws:
UnsupportedEncodingException - if for an invalid encoding.
Method Detail

close

public void close()
           throws IOException
Marks the stream closed before flushing it.

Specified by:
close in interface Closeable
Overrides:
close in class OutputStreamWriter
Throws:
IOException - for I/O errors.


Copyright © 2004 The Norther Organization. All rights reserved.