async.net.http.impl
Class DefaulHttpResponse

java.lang.Object
  extended by async.net.http.impl.DefaulHttpResponse
All Implemented Interfaces:
HttpResponse

public class DefaulHttpResponse
extends Object
implements HttpResponse


Field Summary
protected  HttpResponseOutputStream responseOut
           
 
Constructor Summary
DefaulHttpResponse(OutputStream out)
           
 
Method Summary
 void close()
           
 void flush()
           
 byte[] getHead()
           
 OutputStream getOutputStream()
           
 PrintWriter getWriter()
           
 boolean isFlush()
           
 void sendError()
           
 void sendRedirect(String url)
           
 void setEncoding(String encoding)
           
 void setHeader(String key, String value)
           
 void setReturnCode(int code)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

responseOut

protected HttpResponseOutputStream responseOut
Constructor Detail

DefaulHttpResponse

public DefaulHttpResponse(OutputStream out)
Method Detail

setReturnCode

public void setReturnCode(int code)
Specified by:
setReturnCode in interface HttpResponse

getOutputStream

public OutputStream getOutputStream()
Specified by:
getOutputStream in interface HttpResponse

getHead

public byte[] getHead()
               throws IOException
Throws:
IOException

setHeader

public void setHeader(String key,
                      String value)
Specified by:
setHeader in interface HttpResponse

close

public void close()
           throws IOException
Throws:
IOException

isFlush

public boolean isFlush()

sendError

public void sendError()
               throws IOException
Throws:
IOException

getWriter

public PrintWriter getWriter()
Specified by:
getWriter in interface HttpResponse

sendRedirect

public void sendRedirect(String url)
Specified by:
sendRedirect in interface HttpResponse

flush

public void flush()
           throws IOException
Throws:
IOException

setEncoding

public void setEncoding(String encoding)
Specified by:
setEncoding in interface HttpResponse


Copyright © 2011. All Rights Reserved.