org.mortbay.jetty
Class HttpGenerator.OutputWriter

java.lang.Object
  extended byjava.io.Writer
      extended byorg.mortbay.jetty.HttpGenerator.OutputWriter
Direct Known Subclasses:
HttpConnection.OutputWriter
Enclosing class:
HttpGenerator

public static class HttpGenerator.OutputWriter
extends Writer

OutputWriter. A writer that can wrap a Output stream and provide character encodings. The UTF-8 encoding is done by this class and no additional buffers or Writers are used. The UTF-8 code was inspired by http://javolution.org


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
HttpGenerator.OutputWriter(HttpGenerator.Output out)
           
 
Method Summary
 void close()
           
 void flush()
           
 void setCharacterEncoding(String encoding)
           
 void write(char[] s, int offset, int length)
           
 void write(String s, int offset, int length)
           
 void writeUtf8(char[] s, int offset, int length)
           
 void writeUtf8(String s, int offset, int length)
           
 
Methods inherited from class java.io.Writer
write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpGenerator.OutputWriter

public HttpGenerator.OutputWriter(HttpGenerator.Output out)
Method Detail

setCharacterEncoding

public void setCharacterEncoding(String encoding)

close

public void close()
           throws IOException
Throws:
IOException

flush

public void flush()
           throws IOException
Throws:
IOException

write

public void write(String s,
                  int offset,
                  int length)
           throws IOException
Throws:
IOException

write

public void write(char[] s,
                  int offset,
                  int length)
           throws IOException
Throws:
IOException

writeUtf8

public void writeUtf8(char[] s,
                      int offset,
                      int length)
               throws IOException
Throws:
IOException

writeUtf8

public void writeUtf8(String s,
                      int offset,
                      int length)
               throws IOException
Throws:
IOException