HttpServerResponse
public class DefaultHttpServerResponse extends Object implements HttpServerResponse
Constructor | Description |
---|---|
DefaultHttpServerResponse(Socket socket) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
OutputStream |
getOutputStream() |
Get the output stream.
|
void |
setHeader(String name,
String value) |
Add the header.
|
void |
setStatus(int status) |
Set the status.
|
void |
writeHeaders() |
Write the headers.
|
void |
writeStatusLine() |
Write the status line.
|
public DefaultHttpServerResponse(Socket socket)
socket
- the socket.public OutputStream getOutputStream()
getOutputStream
in interface HttpServerResponse
public void setHeader(String name, String value)
setHeader
in interface HttpServerResponse
name
- the name.value
- the value.public void setStatus(int status)
setStatus
in interface HttpServerResponse
status
- the status.public void writeHeaders() throws IOException
writeHeaders
in interface HttpServerResponse
IOException
- when an I/O error occurs.public void writeStatusLine() throws IOException
writeStatusLine
in interface HttpServerResponse
IOException
- when an I/O error occurs.Copyright © 2020 Piranha Cloud. All rights reserved.