public static class Doge.BaseHttpExchange extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,Object> |
attributes |
protected byte[] |
cachedBody |
protected Map<String,String> |
cachedQueryParams |
protected static int |
DEFAULT_BUFFER_SIZE |
com.sun.net.httpserver.HttpExchange |
inner |
protected int |
maxRequestBodySize |
protected int |
statusCode |
| 构造器和说明 |
|---|
BaseHttpExchange(com.sun.net.httpserver.HttpExchange inner) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
attr(String name) |
<T> T |
attr(String name,
Class<T> type) |
Doge.BaseHttpExchange |
attr(String name,
Object value) |
String |
body() |
byte[] |
bytes() |
void |
close() |
Doge.BaseHttpExchange |
contentType(String type) |
String |
cookie(String name) |
Doge.BaseHttpExchange |
cookie(String name,
String value,
int maxAge) |
void |
download(File file,
String filename) |
String |
header(String name) |
Doge.BaseHttpExchange |
header(String name,
String value) |
com.sun.net.httpserver.Headers |
headers() |
void |
html(String htmlContent) |
void |
json(Object obj) |
Doge.BaseHttpExchange |
maxRequestBodySize(int size) |
String |
method() |
Map<String,String> |
params() |
String |
path() |
void |
redirect(String location) |
void |
result(byte[] responseBytes) |
void |
result(InputStream inputStream) |
void |
result(Object obj) |
void |
sse(java.util.function.Consumer<Doge.SseEmitter> handler) |
void |
staticFile(File root,
String path) |
Doge.BaseHttpExchange |
status(int code) |
static String |
urlDecode(String str) |
public final com.sun.net.httpserver.HttpExchange inner
protected int statusCode
protected int maxRequestBodySize
protected byte[] cachedBody
protected static final int DEFAULT_BUFFER_SIZE
public String path()
public String method()
public com.sun.net.httpserver.Headers headers()
public void json(Object obj)
public Doge.BaseHttpExchange status(int code)
public Doge.BaseHttpExchange contentType(String type)
public void redirect(String location)
public Doge.BaseHttpExchange attr(String name, Object value)
public <T> T attr(String name)
public void sse(java.util.function.Consumer<Doge.SseEmitter> handler)
public void close()
public String body()
public byte[] bytes()
public Doge.BaseHttpExchange header(String name, String value)
public Doge.BaseHttpExchange cookie(String name, String value, int maxAge)
public void html(String htmlContent)
public void result(Object obj)
public void result(byte[] responseBytes)
public void result(InputStream inputStream)
public Doge.BaseHttpExchange maxRequestBodySize(int size)
Copyright © 2025. All rights reserved.