public class ContentCachingResponseWrapper extends HttpServletResponseWrapperEE
byte array
を介して取得できるようにする HttpServletResponse
EE ラッパー。 使用済み ShallowEtagHeaderFilter
による。注: Spring Framework 5.0 以降、このラッパーは Servlet 3.1 API に基づいて構築されています。
ContentCachingRequestWrapper
SC_ACCEPTEDEE, SC_BAD_GATEWAYEE, SC_BAD_REQUESTEE, SC_CONFLICTEE, SC_CONTINUEEE, SC_CREATEDEE, SC_EXPECTATION_FAILEDEE, SC_FORBIDDENEE, SC_FOUNDEE, SC_GATEWAY_TIMEOUTEE, SC_GONEEE, SC_HTTP_VERSION_NOT_SUPPORTEDEE, SC_INTERNAL_SERVER_ERROREE, SC_LENGTH_REQUIREDEE, SC_METHOD_NOT_ALLOWEDEE, SC_MOVED_PERMANENTLYEE, SC_MOVED_TEMPORARILYEE, SC_MULTIPLE_CHOICESEE, SC_NO_CONTENTEE, SC_NON_AUTHORITATIVE_INFORMATIONEE, SC_NOT_ACCEPTABLEEE, SC_NOT_FOUNDEE, SC_NOT_IMPLEMENTEDEE, SC_NOT_MODIFIEDEE, SC_OKEE, SC_PARTIAL_CONTENTEE, SC_PAYMENT_REQUIREDEE, SC_PRECONDITION_FAILEDEE, SC_PROXY_AUTHENTICATION_REQUIREDEE, SC_REQUEST_ENTITY_TOO_LARGEEE, SC_REQUEST_TIMEOUTEE, SC_REQUEST_URI_TOO_LONGEE, SC_REQUESTED_RANGE_NOT_SATISFIABLEEE, SC_RESET_CONTENTEE, SC_SEE_OTHEREE, SC_SERVICE_UNAVAILABLEEE, SC_SWITCHING_PROTOCOLSEE, SC_TEMPORARY_REDIRECTEE, SC_UNAUTHORIZEDEE, SC_UNSUPPORTED_MEDIA_TYPEEE, SC_USE_PROXYEE
コンストラクターと説明 |
---|
ContentCachingResponseWrapper(HttpServletResponseEE response) 指定されたサーブレットレスポンスに対して新しい ContentCachingResponseWrapper を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | copyBodyToResponse() キャッシュされた完全な本文コンテンツをレスポンスにコピーします。 |
protected void | copyBodyToResponse(boolean complete) キャッシュされた本文コンテンツをレスポンスにコピーします。 |
void | flushBuffer() |
byte[] | getContentAsByteArray() キャッシュされたレスポンスコンテンツをバイト配列として返します。 |
InputStreamSE | getContentInputStream() キャッシュされたコンテンツに InputStream SE を返します。 |
int | getContentSize() キャッシュされたコンテンツの現在のサイズを返します。 |
ServletOutputStreamEE | getOutputStream() |
int | getStatusCode() 使用すべきではありません。 5.2 現在、 HttpServletResponse.getStatus() EE を推奨 |
PrintWriterSE | getWriter() |
void | reset() |
void | resetBuffer() |
void | sendError(int sc) |
void | sendError(int sc, StringSE msg) |
void | sendRedirect(StringSE location) |
void | setBufferSize(int size) |
void | setContentLength(int len) |
void | setContentLengthLong(long len) |
addCookieEE, addDateHeaderEE, addHeaderEE, addIntHeaderEE, containsHeaderEE, encodeRedirectUrlEE, encodeRedirectURLEE, encodeUrlEE, encodeURLEE, getHeaderEE, getHeaderNamesEE, getHeadersEE, getStatusEE, getTrailerFieldsEE, setDateHeaderEE, setHeaderEE, setIntHeaderEE, setStatusEE, setStatusEE, setTrailerFieldsEE
getBufferSizeEE, getCharacterEncodingEE, getContentTypeEE, getLocaleEE, getResponseEE, isCommittedEE, isWrapperForEE, isWrapperForEE, setCharacterEncodingEE, setContentTypeEE, setLocaleEE, setResponseEE
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
getBufferSizeEE, getCharacterEncodingEE, getContentTypeEE, getLocaleEE, isCommittedEE, setCharacterEncodingEE, setContentTypeEE, setLocaleEE
public ContentCachingResponseWrapper(HttpServletResponseEE response)
response
- 元のサーブレットレスポンス public void sendError(int sc) throws IOExceptionSE
HttpServletResponseEE
の sendErrorEE
HttpServletResponseWrapperEE
の sendErrorEE
IOExceptionSE
public void sendError(int sc, StringSE msg) throws IOExceptionSE
HttpServletResponseEE
の sendErrorEE
HttpServletResponseWrapperEE
の sendErrorEE
IOExceptionSE
public void sendRedirect(StringSE location) throws IOExceptionSE
HttpServletResponseEE
の sendRedirectEE
HttpServletResponseWrapperEE
の sendRedirectEE
IOExceptionSE
public ServletOutputStreamEE getOutputStream() throws IOExceptionSE
ServletResponseEE
の getOutputStreamEE
ServletResponseWrapperEE
の getOutputStreamEE
IOExceptionSE
public PrintWriterSE getWriter() throws IOExceptionSE
ServletResponseEE
の getWriterEE
ServletResponseWrapperEE
の getWriterEE
IOExceptionSE
public void flushBuffer() throws IOExceptionSE
ServletResponseEE
の flushBufferEE
ServletResponseWrapperEE
の flushBufferEE
IOExceptionSE
public void setContentLength(int len)
ServletResponseEE
の setContentLengthEE
ServletResponseWrapperEE
の setContentLengthEE
public void setContentLengthLong(long len)
ServletResponseEE
の setContentLengthLongEE
ServletResponseWrapperEE
の setContentLengthLongEE
public void setBufferSize(int size)
ServletResponseEE
の setBufferSizeEE
ServletResponseWrapperEE
の setBufferSizeEE
public void resetBuffer()
ServletResponseEE
の resetBufferEE
ServletResponseWrapperEE
の resetBufferEE
public void reset()
ServletResponseEE
の resetEE
ServletResponseWrapperEE
の resetEE
@DeprecatedSE public int getStatusCode()
HttpServletResponse.getStatus()
EE に変更 public byte[] getContentAsByteArray()
public InputStreamSE getContentInputStream()
InputStream
SE を返します。public int getContentSize()
public void copyBodyToResponse() throws IOExceptionSE
IOExceptionSE
protected void copyBodyToResponse(boolean complete) throws IOExceptionSE
complete
- 完全なキャッシュされた本文コンテンツに対応するコンテンツの長さを設定するかどうか IOExceptionSE