📄 recordinginputstream.html
字号:
<B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="RecordingInputStream(int, java.lang.String)"><!-- --></A><H3>RecordingInputStream</H3><PRE>public <B>RecordingInputStream</B>(int bufferSize, java.lang.String backingFilename)</PRE><DL><DD>Create a new RecordingInputStream.<P><DL><DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - Size of buffer to use.<DD><CODE>backingFilename</CODE> - Name of backing file.</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="open(java.io.InputStream)"><!-- --></A><H3>open</H3><PRE>public void <B>open</B>(java.io.InputStream wrappedStream) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="read()"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>() throws java.io.IOException</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE>read</CODE> in class <CODE>java.io.InputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="read(byte[], int, int)"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(byte[] b, int off, int len) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE>read</CODE> in class <CODE>java.io.InputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="read(byte[])"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(byte[] b) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE>read</CODE> in class <CODE>java.io.InputStream</CODE></DL></DD><DD><DL><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>() throws java.io.IOException</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE>close</CODE> in interface <CODE>java.io.Closeable</CODE><DT><B>Overrides:</B><DD><CODE>close</CODE> in class <CODE>java.io.InputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><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>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="getContentReplayInputStream()"><!-- --></A><H3>getContentReplayInputStream</H3><PRE>public <A HREF="../../../org/archive/io/ReplayInputStream.html" title="class in org.archive.io">ReplayInputStream</A> <B>getContentReplayInputStream</B>() throws java.io.IOException</PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="readFully()"><!-- --></A><H3>readFully</H3><PRE>public long <B>readFully</B>() throws java.io.IOException</PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="readFullyOrUntil(long, long, long, int)"><!-- --></A><H3>readFullyOrUntil</H3><PRE>public void <B>readFullyOrUntil</B>(long softMaxLength, long hardMaxLength, long timeout, int maxBytesPerMs) throws java.io.IOException, <A HREF="../../../org/archive/io/RecorderLengthExceededException.html" title="class in org.archive.io">RecorderLengthExceededException</A>, <A HREF="../../../org/archive/io/RecorderTimeoutException.html" title="class in org.archive.io">RecorderTimeoutException</A>, java.lang.InterruptedException</PRE><DL><DD>Read all of a stream (Or read until we timeout or have read to the max).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>softMaxLength</CODE> - Maximum length to read; if zero or < 0, then no limit. If met, return normally.<DD><CODE>hardMaxLength</CODE> - Maximum length to read; if zero or < 0, then no limit. If exceeded, throw RecorderLengthExceededException<DD><CODE>timeout</CODE> - Timeout in milliseconds for total read; if zero or negative, timeout is <code>Long.MAX_VALUE</code>. If exceeded, throw RecorderTimeoutException<DD><CODE>maxBytesPerMs</CODE> - How many bytes per millisecond.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - failed read.<DD><CODE><A HREF="../../../org/archive/io/RecorderLengthExceededException.html" title="class in org.archive.io">RecorderLengthExceededException</A></CODE><DD><CODE><A HREF="../../../org/archive/io/RecorderTimeoutException.html" title="class in org.archive.io">RecorderTimeoutException</A></CODE><DD><CODE>java.lang.InterruptedException</CODE></DL></DD></DL><HR><A NAME="getSize()"><!-- --></A><H3>getSize</H3><PRE>public long <B>getSize</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="markContentBegin()"><!-- --></A><H3>markContentBegin</H3><PRE>public void <B>markContentBegin</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="startDigest()"><!-- --></A><H3>startDigest</H3><PRE>public void <B>startDigest</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="setSha1Digest()"><!-- --></A><H3>setSha1Digest</H3><PRE>public void <B>setSha1Digest</B>()</PRE><DL><DD>Convenience method for setting SHA1 digest.<P><DD><DL></DL></DD></DL><HR><A NAME="setDigest(java.security.MessageDigest)"><!-- --></A><H3>setDigest</H3><PRE>public void <B>setDigest</B>(java.security.MessageDigest md)</PRE><DL><DD>Sets a digest function which may be applied to recorded data. As usually only a subset of the recorded data should be fed to the digest, you must also call startDigest() to begin digesting.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>md</CODE> - </DL></DD></DL><HR><A NAME="getDigestValue()"><!-- --></A><H3>getDigestValue</H3><PRE>public byte[] <B>getDigestValue</B>()</PRE><DL><DD>Return the digest value for any recorded, digested data. Call only after all data has been recorded; otherwise, the running digest state is ruined.<P><DD><DL><DT><B>Returns:</B><DD>the digest final value</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>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="getReplayCharSequence(java.lang.String)"><!-- --></A><H3>getReplayCharSequence</H3><PRE>public <A HREF="../../../org/archive/io/ReplayCharSequence.html" title="interface in org.archive.io">ReplayCharSequence</A> <B>getReplayCharSequence</B>(java.lang.String characterEncoding) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>characterEncoding</CODE> - Encoding of recorded stream.<DT><B>Returns:</B><DD>A ReplayCharSequence Will return null if an IOException. Call close on returned RCS when done.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></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="closeRecorder()"><!-- --></A><H3>closeRecorder</H3><PRE>public void <B>closeRecorder</B>() throws java.io.IOException</PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="copyContentBodyTo(java.io.File)"><!-- --></A><H3>copyContentBodyTo</H3><PRE>public void <B>copyContentBodyTo</B>(java.io.File tempFile) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>tempFile</CODE> - <DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="isOpen()"><!-- --></A><H3>isOpen</H3><PRE>public boolean <B>isOpen</B>()</PRE><DL><DD><DL><DT><B>Returns:</B><DD>True if we've been opened.</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> </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="class-use/RecordingInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../org/archive/io/RecorderTooMuchHeaderException.html" title="class in org.archive.io"><B>PREV CLASS</B></A> <A HREF="../../../org/archive/io/RecordingOutputStream.html" title="class in org.archive.io"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?org/archive/io/RecordingInputStream.html" target="_top"><B>FRAMES</B></A> <A HREF="RecordingInputStream.html" target="_top"><B>NO FRAMES</B></A> <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: 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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 2003-2006 Internet Archive. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -