⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httprecorder.html

📁 一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="HttpRecorder()"><!-- --></A><H3>HttpRecorder</H3><PRE>protected <B>HttpRecorder</B>()</PRE><DL><DD>Constructor with limited access. Used internally for case where we're wrapping an already downloaded stream with a HttpRecorder.<P></DL><HR><A NAME="HttpRecorder(java.io.File, java.lang.String, int, int)"><!-- --></A><H3>HttpRecorder</H3><PRE>public <B>HttpRecorder</B>(java.io.File&nbsp;tempDir,                    java.lang.String&nbsp;backingFilenameBase,                    int&nbsp;outBufferSize,                    int&nbsp;inBufferSize)</PRE><DL><DD>Create an HttpRecorder.<P><DL><DT><B>Parameters:</B><DD><CODE>tempDir</CODE> - Directory into which we drop backing files for recorded input and output.<DD><CODE>backingFilenameBase</CODE> - Backing filename base to which we'll append suffices <code>ris</code> for recorded input stream and <code>ros</code> for recorded output stream.<DD><CODE>outBufferSize</CODE> - Size of output buffer to use.<DD><CODE>inBufferSize</CODE> - Size of input buffer to use.</DL></DL><HR><A NAME="HttpRecorder(java.io.File, java.lang.String)"><!-- --></A><H3>HttpRecorder</H3><PRE>public <B>HttpRecorder</B>(java.io.File&nbsp;tempDir,                    java.lang.String&nbsp;backingFilenameBase)</PRE><DL><DD>Create an HttpRecorder.<P><DL><DT><B>Parameters:</B><DD><CODE>tempDir</CODE> - Directory into which we drop backing files for recorded input            and output.<DD><CODE>backingFilenameBase</CODE> - Backing filename base to which we'll append suffices            <code>ris</code> for recorded input stream and            <code>ros</code> for recorded output stream.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="inputWrap(java.io.InputStream)"><!-- --></A><H3>inputWrap</H3><PRE>public java.io.InputStream <B>inputWrap</B>(java.io.InputStream&nbsp;is)                              throws java.io.IOException</PRE><DL><DD>Wrap the provided stream with the internal RecordingInputStream open() throws an exception if RecordingInputStream is already open.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>is</CODE> - InputStream to wrap.<DT><B>Returns:</B><DD>The input stream wrapper which itself is an input stream. Pass this in place of the passed stream so input can be recorded.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="outputWrap(java.io.OutputStream)"><!-- --></A><H3>outputWrap</H3><PRE>public java.io.OutputStream <B>outputWrap</B>(java.io.OutputStream&nbsp;os)                                throws java.io.IOException</PRE><DL><DD>Wrap the provided stream with the internal RecordingOutputStream open() throws an exception if RecordingOutputStream is already open.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>os</CODE> - The output stream to wrap.<DT><B>Returns:</B><DD>The output stream wrapper which is itself an output stream. Pass this in place of the passed stream so output can be recorded.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()</PRE><DL><DD>Close all streams.<P><DD><DL></DL></DD></DL><HR><A NAME="getRecordedInput()"><!-- --></A><H3>getRecordedInput</H3><PRE>public <A HREF="../../../org/archive/io/RecordingInputStream.html" title="class in org.archive.io">RecordingInputStream</A> <B>getRecordedInput</B>()</PRE><DL><DD>Return the internal RecordingInputStream<P><DD><DL><DT><B>Returns:</B><DD>A RIS.</DL></DD></DL><HR><A NAME="getRecordedOutput()"><!-- --></A><H3>getRecordedOutput</H3><PRE>public <A HREF="../../../org/archive/io/RecordingOutputStream.html" title="class in org.archive.io">RecordingOutputStream</A> <B>getRecordedOutput</B>()</PRE><DL><DD><DL><DT><B>Returns:</B><DD>The RecordingOutputStream.</DL></DD></DL><HR><A NAME="markContentBegin()"><!-- --></A><H3>markContentBegin</H3><PRE>public void <B>markContentBegin</B>()</PRE><DL><DD>Mark current position as the point where the HTTP headers end.<P><DD><DL></DL></DD></DL><HR><A NAME="getResponseContentLength()"><!-- --></A><H3>getResponseContentLength</H3><PRE>public long <B>getResponseContentLength</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="closeRecorders()"><!-- --></A><H3>closeRecorders</H3><PRE>public void <B>closeRecorders</B>()</PRE><DL><DD>Close both input and output recorders. Recorders are the output streams to which we are recording. <A HREF="../../../org/archive/util/HttpRecorder.html#close()"><CODE>close()</CODE></A> closes the stream that is being recorded and the recorder. This method explicitly closes the recorder only.<P><DD><DL></DL></DD></DL><HR><A NAME="cleanup()"><!-- --></A><H3>cleanup</H3><PRE>public void <B>cleanup</B>()</PRE><DL><DD>Cleanup backing files. Call when completely done w/ recorder.  Removes any backing files that may have been dropped.<P><DD><DL></DL></DD></DL><HR><A NAME="getHttpRecorder()"><!-- --></A><H3>getHttpRecorder</H3><PRE>public static <A HREF="../../../org/archive/util/HttpRecorder.html" title="class in org.archive.util">HttpRecorder</A> <B>getHttpRecorder</B>()</PRE><DL><DD>Get the current threads' HttpRecorder.<P><DD><DL><DT><B>Returns:</B><DD>This threads' HttpRecorder.  Returns null if can't find a HttpRecorder in current instance.</DL></DD></DL><HR><A NAME="setCharacterEncoding(java.lang.String)"><!-- --></A><H3>setCharacterEncoding</H3><PRE>public void <B>setCharacterEncoding</B>(java.lang.String&nbsp;characterEncoding)</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>characterEncoding</CODE> - Character encoding of recording.</DL></DD></DL><HR><A NAME="getCharacterEncoding()"><!-- --></A><H3>getCharacterEncoding</H3><PRE>public java.lang.String <B>getCharacterEncoding</B>()</PRE><DL><DD><DL><DT><B>Returns:</B><DD>Returns the characterEncoding.</DL></DD></DL><HR><A NAME="getReplayCharSequence()"><!-- --></A><H3>getReplayCharSequence</H3><PRE>public <A HREF="../../../org/archive/io/ReplayCharSequence.html" title="interface in org.archive.io">ReplayCharSequence</A> <B>getReplayCharSequence</B>()                                         throws java.io.IOException</PRE><DL><DD><DL><DT><B>Returns:</B><DD>A ReplayCharSequence.  Call close on the RCS when done w/ it. Will return indeterminate results if the underlying recording streams have not been closed first.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="getReplayInputStream()"><!-- --></A><H3>getReplayInputStream</H3><PRE>public <A HREF="../../../org/archive/io/ReplayInputStream.html" title="class in org.archive.io">ReplayInputStream</A> <B>getReplayInputStream</B>()                                       throws java.io.IOException</PRE><DL><DD><DL><DT><B>Returns:</B><DD>A replay input stream.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="wrapInputStreamWithHttpRecord(java.io.File, java.lang.String, java.io.InputStream, java.lang.String)"><!-- --></A><H3>wrapInputStreamWithHttpRecord</H3><PRE>public static <A HREF="../../../org/archive/util/HttpRecorder.html" title="class in org.archive.util">HttpRecorder</A> <B>wrapInputStreamWithHttpRecord</B>(java.io.File&nbsp;dir,                                                         java.lang.String&nbsp;basename,                                                         java.io.InputStream&nbsp;in,                                                         java.lang.String&nbsp;encoding)                                                  throws java.io.IOException</PRE><DL><DD>Record the input stream for later playback by an extractor, etc. This is convenience method used to setup an artificial HttpRecorder scenario used in unit tests, etc.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dir</CODE> - Directory to write backing file to.<DD><CODE>basename</CODE> - of what we're recording.<DD><CODE>in</CODE> - Stream to read.<DD><CODE>encoding</CODE> - Stream encoding.<DT><B>Returns:</B><DD>An <A HREF="../../../org/archive/util/HttpRecorder.html" title="class in org.archive.util"><CODE>HttpRecorder</CODE></A>.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HttpRecorder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/archive/util/Histotable.html" title="class in org.archive.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/archive/util/HttpRecorderMarker.html" title="interface in org.archive.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/archive/util/HttpRecorder.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="HttpRecorder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 2003-2006 Internet Archive. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -