pygmy.core
Class HttpResponse
java.lang.Object
pygmy.core.Response
pygmy.core.HttpResponse
public class HttpResponse
- extends Response
This holds the response data for the http response.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpResponse
public HttpResponse(HttpRequest request,
java.io.OutputStream aStream)
HttpResponse
public HttpResponse(HttpRequest request,
java.io.OutputStream aStream,
ResponseListener listener)
isKeepAlive
public boolean isKeepAlive()
addHeader
public void addHeader(java.lang.String key,
java.lang.String value)
getPrintWriter
public java.io.PrintWriter getPrintWriter()
setMimeType
public void setMimeType(java.lang.String aMimeType)
sendError
public void sendError(int statusCode,
java.lang.String errorMessage)
sendError
public void sendError(int statusCode,
java.lang.String errorMessage,
java.lang.Exception e)
sendResponse
public void sendResponse(java.io.InputStream is,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
sendResponse
public void sendResponse(java.io.InputStream is,
long beginning,
long ending)
throws java.io.IOException
- Throws:
java.io.IOException
setStatusCode
public void setStatusCode(int statusCode)
commitResponse
public void commitResponse()
throws java.io.IOException
- Throws:
java.io.IOException
getOutputStream
public java.io.OutputStream getOutputStream()
startTransfer
protected void startTransfer()
notifyListeners
protected void notifyListeners(int bytesSent,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
endTransfer
protected void endTransfer()
endTransfer
protected void endTransfer(java.lang.Exception e)