📄 outputfilterbase.html
字号:
public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> <B>EXCEPTION_KEY</B></PRE>
<DL>
<DD>Where the exception caught when executing <i>perform()</i> is stored in the request (so that it can be used on customized error pages).
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.lowagie.servlets.OutputFilterBase.EXCEPTION_KEY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="fConfig"><!-- --></A><H3>
fConfig</H3>
<PRE>
protected javax.servlet.FilterConfig <B>fConfig</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="OutputFilterBase()"><!-- --></A><H3>
OutputFilterBase</H3>
<PRE>
public <B>OutputFilterBase</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><!-- --></A><H3>
doFilter</H3>
<PRE>
public final void <B>doFilter</B>(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A>, javax.servlet.ServletException</PRE>
<DL>
<DD><p>Prepares the filter before calling the filter chain. This enables the implementing class to provide customized <i>ServletRequest</i> and <i>ServletResponse</i> objects to the chain.</p> <p>After calling the chain, if a object is found under the "PREVENT_FILTER" key in the ServletRequest objeto, the output filter is not executed (that is, the <i>perform()</i> method is not called). If this situation is detected, the buffer received from the chain is copied to the original ServletResponse object.</p> <p>Also, if the response has been committed (e.g., by calling sendError() on the response), the filter is not applied.</p> <p>If an exception occurs during the execution of the <i>perform()</i> method, a <i>Internal Server Error</i> is sent to the response with the exception message. The exception is stored under the "EXCEPTION_KEY" key of the request.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>doFilter</CODE> in interface <CODE>javax.servlet.Filter</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The request from the filter chain (or from the browser, if this is the first filter).<DD><CODE>response</CODE> - The response from the filter chain (or browser).<DD><CODE>chain</CODE> - The filter chain.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE><DD><CODE>javax.servlet.ServletException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="prepareRequest(javax.servlet.ServletRequest)"><!-- --></A><H3>
prepareRequest</H3>
<PRE>
protected javax.servlet.ServletRequest <B>prepareRequest</B>(javax.servlet.ServletRequest request)</PRE>
<DL>
<DD><p>This method is called before executing the filter chain. It should return a ServletRequest object to be provided to the chain. The default implementation just returns the request object passed.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The request received from the filter chain.<DT><B>Returns:</B><DD>A ServletRequest to be sent to the filter chain.</DL>
</DD>
</DL>
<HR>
<A NAME="prepareResponse(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><!-- --></A><H3>
prepareResponse</H3>
<PRE>
protected <A HREF="../../../com/lowagie/servlets/BufferedResponse.html">BufferedResponse</A> <B>prepareResponse</B>(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD><p>This method is called before executing the filter chain, and should return a BufferedResponse objeto to be sent to the chain. This implementation uses the default BufferedResponse implementation, that stores data received from the resources called from the chain in a memory buffer.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The request from the filter chain.<DD><CODE>response</CODE> - The response from the filter chain.<DT><B>Returns:</B><DD>An instance of BufferedResponse that wraps the original response object.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="perform(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.io.InputStream)"><!-- --></A><H3>
perform</H3>
<PRE>
protected abstract void <B>perform</B>(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/InputStream.html">InputStream</A> data) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html">Exception</A></PRE>
<DL>
<DD><p>This method should contain the logic to manipulate the data coming from the resources called by the filter chain and send the data to the response object received.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The original request received from the chain.<DD><CODE>response</CODE> - The original response received from the chain.<DD><CODE>data</CODE> - An InputStream containing the buffer that stores the data from the called resources.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html">Exception</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="dump(com.lowagie.servlets.BufferedResponse, javax.servlet.ServletResponse)"><!-- --></A><H3>
dump</H3>
<PRE>
protected void <B>dump</B>(<A HREF="../../../com/lowagie/servlets/BufferedResponse.html">BufferedResponse</A> data, javax.servlet.ServletResponse res) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD><p>Dumps the contents of the passed BufferedResponse to the ServletResponse. Before dumping the data itself, sets the original content type and the original content length.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - A BufferedResponse object.<DD><CODE>res</CODE> - A ServletResponse where to dump the data to.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="dump(java.io.InputStream, javax.servlet.ServletResponse)"><!-- --></A><H3>
dump</H3>
<PRE>
protected void <B>dump</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/InputStream.html">InputStream</A> in, javax.servlet.ServletResponse res) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD><p>Dumps the data from the InputStream passed to the ServletResponse's OutputStream.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - An input stream.<DD><CODE>res</CODE> - A ServletResponse where to dump the data to.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="sendError(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Throwable)"><!-- --></A><H3>
sendError</H3>
<PRE>
protected void <B>sendError</B>(javax.servlet.ServletRequest req, javax.servlet.http.HttpServletResponse res, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html">Throwable</A> t) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD><p>Stores the throwable in the EXCEPTION_KEY attribute of the request and sends an "Internal Server Error" to the response with the message from the error.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="init(javax.servlet.FilterConfig)"><!-- --></A><H3>
init</H3>
<PRE>
public void <B>init</B>(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>init</CODE> in interface <CODE>javax.servlet.Filter</CODE></DL>
</DD>
<DD><DL>
<DD><CODE>javax.servlet.ServletException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <B>destroy</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>destroy</CODE> in interface <CODE>javax.servlet.Filter</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFilterConfig()"><!-- --></A><H3>
getFilterConfig</H3>
<PRE>
public javax.servlet.FilterConfig <B>getFilterConfig</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setFilterConfig(javax.servlet.FilterConfig)"><!-- --></A><H3>
setFilterConfig</H3>
<PRE>
public void <B>setFilterConfig</B>(javax.servlet.FilterConfig filterConfig)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/lowagie/servlets/ITextOutputFilter.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="OutputFilterBase.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -