private class LoggingCorsHttpServer.LoggedResponse extends HttpServer.Response
Modifier and Type | Field and Description |
---|---|
private HttpServer.Response |
base_ |
private java.lang.String |
bodyText_ |
private java.lang.String |
headText_ |
private boolean |
logBody_ |
Constructor and Description |
---|
LoggedResponse(HttpServer.Response base,
int iseq,
boolean logBody)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
writeBody(java.io.OutputStream out)
Implemented to generate the bytes in the body of the response.
|
void |
writeResponse(java.io.OutputStream out)
Writes this response to an output stream in a way suitable for
replying to the client.
|
getHeaderMap, getStatusCode, getStatusPhrase
private final HttpServer.Response base_
private final boolean logBody_
private final java.lang.String headText_
private java.lang.String bodyText_
LoggedResponse(HttpServer.Response base, int iseq, boolean logBody)
base
- response on which this one is basediseq
- sequence number of request that this is a response tologBody
- true iff the body of the response is to be loggedpublic void writeBody(java.io.OutputStream out) throws java.io.IOException
HttpServer.Response
writeBody
in class HttpServer.Response
out
- destination stream for body bytesjava.io.IOException
public void writeResponse(java.io.OutputStream out) throws java.io.IOException
HttpServer.Response
HttpServer.Response.writeBody(java.io.OutputStream)
is called.writeResponse
in class HttpServer.Response
out
- destination streamjava.io.IOException