public abstract class Response
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected com.sun.net.httpserver.Headers |
responseHeaders |
Constructor and Description |
---|
Response()
Default Response constructor that defaults ResponseType to HTML.
|
Response(ResponseType type) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
getCode() |
java.lang.String |
getContent() |
protected java.lang.String |
getHeader() |
java.util.Optional<java.lang.String> |
getHeader(java.lang.String called) |
java.lang.String |
getResponse() |
int |
hashCode() |
void |
send(com.sun.net.httpserver.HttpExchange exchange,
Locale locale,
Theme theme) |
void |
setContent(java.lang.String content) |
void |
setHeader(java.lang.String header) |
void |
setResponseHeaders(com.sun.net.httpserver.Headers responseHeaders) |
protected void |
setType(ResponseType type) |
java.lang.String |
toString() |
public Response(ResponseType type)
public Response()
protected java.lang.String getHeader()
public java.util.Optional<java.lang.String> getHeader(java.lang.String called)
public void setHeader(java.lang.String header)
public java.lang.String getResponse()
public java.lang.String getContent()
public void setContent(java.lang.String content)
public int getCode()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void setType(ResponseType type)
public void setResponseHeaders(com.sun.net.httpserver.Headers responseHeaders)
public void send(com.sun.net.httpserver.HttpExchange exchange, Locale locale, Theme theme) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object