org.mule.transport.http
Class ResponseWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by org.mule.transport.http.ResponseWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class ResponseWriter
extends FilterWriter

Provides a hybrid Writer/OutputStream for sending HTTP response data


Field Summary
static String CRLF
           
static String ISO_8859_1
           
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ResponseWriter(OutputStream outStream)
           
ResponseWriter(OutputStream outStream, String encoding)
           
ResponseWriter(OutputStream outStream, String lineSeparator, String encoding)
           
 
Method Summary
 void close()
           
 void flush()
           
 String getEncoding()
           
 void print(int i)
           
 void print(String s)
           
 void println()
           
 void println(int i)
           
 void println(String s)
           
 void write(byte b)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterWriter
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
 

Field Detail

CRLF

public static final String CRLF
See Also:
Constant Field Values

ISO_8859_1

public static final String ISO_8859_1
See Also:
Constant Field Values
Constructor Detail

ResponseWriter

public ResponseWriter(OutputStream outStream)
               throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

ResponseWriter

public ResponseWriter(OutputStream outStream,
                      String encoding)
               throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

ResponseWriter

public ResponseWriter(OutputStream outStream,
                      String lineSeparator,
                      String encoding)
               throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

getEncoding

public String getEncoding()

close

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

flush

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

write

public void write(byte b)
           throws IOException
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Throws:
IOException

print

public void print(String s)
           throws IOException
Throws:
IOException

print

public void print(int i)
           throws IOException
Throws:
IOException

println

public void println(int i)
             throws IOException
Throws:
IOException

println

public void println(String s)
             throws IOException
Throws:
IOException

println

public void println()
             throws IOException
Throws:
IOException


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.