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, getStatusPhraseprivate 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.ResponsewriteBody in class HttpServer.Responseout - destination stream for body bytesjava.io.IOExceptionpublic void writeResponse(java.io.OutputStream out)
throws java.io.IOException
HttpServer.ResponseHttpServer.Response.writeBody(java.io.OutputStream)
is called.writeResponse in class HttpServer.Responseout - destination streamjava.io.IOException