@Ignored public interface IView extends Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET |
| Modifier and Type | Method and Description |
|---|---|
IView |
addAttribute(String name,
Object value)
添加视图属性
|
IView |
addAttributes(Map<String,Object> attributes)
添加视图属性
|
IView |
addDateHeader(String name,
long date)
设置请求回应头
|
IView |
addHeader(String name,
String value)
设置请求回应头
|
IView |
addIntHeader(String name,
int value)
设置请求回应头
|
<T> T |
getAttribute(String name)
获取视图对象属性key的值
|
Map<String,Object> |
getAttributes()
获取视图对象的属性映射
|
String |
getContentType()
获取视图内容类型
|
void |
render()
视图渲染动作
|
void |
render(OutputStream output)
视图渲染动作
|
IView |
setContentType(String contentType)
设置视图内容类型
|
static final String DEFAULT_CHARSET
IView addAttribute(String name, Object value)
name - 属性名称value - 属性值IView addAttributes(Map<String,Object> attributes)
attributes - 属性映射<T> T getAttribute(String name)
T - 属性类型name - 属性名称String getContentType()
IView setContentType(String contentType)
contentType - 内容类型IView addDateHeader(String name, long date)
name - Head名称date - 值IView addHeader(String name, String value)
name - Head名称value - 值IView addIntHeader(String name, int value)
name - Head名称value - 值void render(OutputStream output) throws Exception
output - 视图渲染指定输出流Exception - 抛出任何可能异常Copyright © 2022. All rights reserved.