juglr.net
Class HTTPWriter

java.lang.Object
  extended by juglr.net.HTTPWriter
Direct Known Subclasses:
HTTPRequestWriter, HTTPResponseWriter

public class HTTPWriter
extends java.lang.Object

Base class for HTTPResponseWriter and HTTPRequestWriter


Field Summary
protected  java.nio.ByteBuffer buf
           
protected  java.nio.channels.SocketChannel channel
           
 
Method Summary
 void close()
           
 void flush()
           
 void startBody()
           
 void writeBody(byte b)
           
 void writeBody(byte[] bytes)
           
 void writeBody(byte[] bytes, int offset, int len)
           
 void writeBody(java.lang.CharSequence s)
           
 void writeHeader(java.lang.String name, java.lang.String value)
           
 void writeLF()
           
 void writeSpace()
           
 void writeVersion(HTTP.Version version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected java.nio.ByteBuffer buf

channel

protected java.nio.channels.SocketChannel channel
Method Detail

writeSpace

public void writeSpace()
                throws java.io.IOException
Throws:
java.io.IOException

writeLF

public void writeLF()
             throws java.io.IOException
Throws:
java.io.IOException

writeVersion

public void writeVersion(HTTP.Version version)
                  throws java.io.IOException
Throws:
java.io.IOException

writeHeader

public void writeHeader(java.lang.String name,
                        java.lang.String value)
                 throws java.io.IOException
Throws:
java.io.IOException

startBody

public void startBody()
               throws java.io.IOException
Throws:
java.io.IOException

writeBody

public void writeBody(java.lang.CharSequence s)
               throws java.io.IOException
Throws:
java.io.IOException

writeBody

public void writeBody(byte[] bytes)
               throws java.io.IOException
Throws:
java.io.IOException

writeBody

public void writeBody(byte b)
               throws java.io.IOException
Throws:
java.io.IOException

writeBody

public void writeBody(byte[] bytes,
                      int offset,
                      int len)
               throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException