类 MockMimeResponse
- java.lang.Object
- org.springframework.mock.web.portlet.MockPortletResponse
- org.springframework.mock.web.portlet.MockMimeResponse
- 所有已实现的接口:
MimeResponse
,PortletResponse
public class MockMimeResponse extends MockPortletResponse implements MimeResponse
Mock implementation of theMimeResponse
interface.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
字段概要
从接口继承的字段 javax.portlet.MimeResponse
CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT
构造器概要
构造器 构造器 说明 MockMimeResponse()
Create a new MockMimeResponse with a defaultMockPortalContext
.MockMimeResponse(PortalContext portalContext)
Create a new MockMimeResponse.MockMimeResponse(PortalContext portalContext, PortletRequest request)
Create a new MockMimeResponse.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 PortletURL
createActionURL()
PortletURL
createRenderURL()
ResourceURL
createResourceURL()
void
flushBuffer()
int
getBufferSize()
CacheControl
getCacheControl()
String
getCharacterEncoding()
byte[]
getContentAsByteArray()
String
getContentAsString()
String
getContentType()
String
getForwardedUrl()
String
getIncludedUrl()
Locale
getLocale()
OutputStream
getPortletOutputStream()
PrintWriter
getWriter()
boolean
isCommitted()
void
reset()
void
resetBuffer()
void
setBufferSize(int bufferSize)
void
setCharacterEncoding(String characterEncoding)
void
setCommitted(boolean committed)
void
setContentType(String contentType)
void
setForwardedUrl(String forwardedUrl)
void
setIncludedUrl(String includedUrl)
void
setLocale(Locale locale)
从类继承的方法 org.springframework.mock.web.portlet.MockPortletResponse
addProperty, addProperty, addProperty, createElement, encodeURL, getCookie, getCookies, getNamespace, getPortalContext, getProperties, getProperty, getPropertyNames, getXmlProperties, getXmlProperty, getXmlPropertyNames, setNamespace, setProperty
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 javax.portlet.PortletResponse
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty
构造器详细资料
MockMimeResponse
public MockMimeResponse()
Create a new MockMimeResponse with a defaultMockPortalContext
.- 另请参阅:
MockPortalContext
MockMimeResponse
public MockMimeResponse(PortalContext portalContext)
Create a new MockMimeResponse.- 参数:
portalContext
- the PortalContext defining the supported PortletModes and WindowStates
MockMimeResponse
public MockMimeResponse(PortalContext portalContext, PortletRequest request)
Create a new MockMimeResponse.- 参数:
portalContext
- the PortalContext defining the supported PortletModes and WindowStatesrequest
- the corresponding render/resource request that this response is being generated for
方法详细资料
setContentType
public void setContentType(String contentType)
- 指定者:
setContentType
在接口中MimeResponse
getContentType
public String getContentType()
- 指定者:
getContentType
在接口中MimeResponse
setCharacterEncoding
public void setCharacterEncoding(String characterEncoding)
getCharacterEncoding
public String getCharacterEncoding()
- 指定者:
getCharacterEncoding
在接口中MimeResponse
getWriter
public PrintWriter getWriter() throws UnsupportedEncodingException
- 指定者:
getWriter
在接口中MimeResponse
- 抛出:
UnsupportedEncodingException
getContentAsByteArray
public byte[] getContentAsByteArray()
getContentAsString
public String getContentAsString() throws UnsupportedEncodingException
getLocale
public Locale getLocale()
- 指定者:
getLocale
在接口中MimeResponse
setBufferSize
public void setBufferSize(int bufferSize)
- 指定者:
setBufferSize
在接口中MimeResponse
getBufferSize
public int getBufferSize()
- 指定者:
getBufferSize
在接口中MimeResponse
flushBuffer
public void flushBuffer()
- 指定者:
flushBuffer
在接口中MimeResponse
resetBuffer
public void resetBuffer()
- 指定者:
resetBuffer
在接口中MimeResponse
setCommitted
public void setCommitted(boolean committed)
isCommitted
public boolean isCommitted()
- 指定者:
isCommitted
在接口中MimeResponse
reset
public void reset()
- 指定者:
reset
在接口中MimeResponse
getPortletOutputStream
public OutputStream getPortletOutputStream() throws IOException
- 指定者:
getPortletOutputStream
在接口中MimeResponse
- 抛出:
IOException
createRenderURL
public PortletURL createRenderURL()
- 指定者:
createRenderURL
在接口中MimeResponse
createActionURL
public PortletURL createActionURL()
- 指定者:
createActionURL
在接口中MimeResponse
createResourceURL
public ResourceURL createResourceURL()
- 指定者:
createResourceURL
在接口中MimeResponse
getCacheControl
public CacheControl getCacheControl()
- 指定者:
getCacheControl
在接口中MimeResponse
setIncludedUrl
public void setIncludedUrl(String includedUrl)
getIncludedUrl
public String getIncludedUrl()
setForwardedUrl
public void setForwardedUrl(String forwardedUrl)
getForwardedUrl
public String getForwardedUrl()