📄 recordingoutputstream.html
字号:
</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#markContentBegin()">markContentBegin</A></B>()</CODE><BR> Remember the current position as the start of the "response body".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#open()">open</A></B>()</CODE><BR> Wrap the given stream, both recording and passing along any data written to this RecordingOutputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#open(java.io.OutputStream)">open</A></B>(java.io.OutputStream wrappedStream)</CODE><BR> Wrap the given stream, both recording and passing along any data written to this RecordingOutputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#setDigest(java.security.MessageDigest)">setDigest</A></B>(java.security.MessageDigest md)</CODE><BR> Sets a digest function which may be applied to recorded data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#setDigest(java.lang.String)">setDigest</A></B>(java.lang.String algorithm)</CODE><BR> Sets a digest function which may be applied to recorded data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#setSha1Digest()">setSha1Digest</A></B>()</CODE><BR> Convenience method for setting SHA1 digest.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#startDigest()">startDigest</A></B>()</CODE><BR> Starts digesting recorded data, if a MessageDigest has been set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#write(byte[])">write</A></B>(byte[] b)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#write(byte[], int, int)">write</A></B>(byte[] b, int off, int len)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/io/RecordingOutputStream.html#write(int)">write</A></B>(int b)</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="bufStreamBuf"><!-- --></A><H3>bufStreamBuf</H3><PRE>protected byte[] <B>bufStreamBuf</B></PRE><DL><DD>Reusable buffer for FastBufferedOutputStream<P><DL></DL></DL><HR><A NAME="MAX_HEADER_MATERIAL"><!-- --></A><H3>MAX_HEADER_MATERIAL</H3><PRE>protected static final long <B>MAX_HEADER_MATERIAL</B></PRE><DL><DD>Maximum amount of header material to accept without the content body beginning -- if more, throw a RecorderTooMuchHeaderException. TODO: make configurable? make smaller?<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.io.RecordingOutputStream.MAX_HEADER_MATERIAL">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="RecordingOutputStream(int, java.lang.String)"><!-- --></A><H3>RecordingOutputStream</H3><PRE>public <B>RecordingOutputStream</B>(int bufferSize, java.lang.String backingFilename)</PRE><DL><DD>Create a new RecordingOutputStream.<P><DL><DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - Buffer size to use.<DD><CODE>backingFilename</CODE> - Name of backing file to use.</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()"><!-- --></A><H3>open</H3><PRE>public void <B>open</B>() throws java.io.IOException</PRE><DL><DD>Wrap the given stream, both recording and passing along any data written to this RecordingOutputStream.<P><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If failed creation of backing file.</DL></DD></DL><HR><A NAME="open(java.io.OutputStream)"><!-- --></A><H3>open</H3><PRE>public void <B>open</B>(java.io.OutputStream wrappedStream) throws java.io.IOException</PRE><DL><DD>Wrap the given stream, both recording and passing along any data written to this RecordingOutputStream.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>wrappedStream</CODE> - Stream to wrap. May be null for case where we want to write to a file backed stream only.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If failed creation of backing file.</DL></DD></DL><HR><A NAME="write(int)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(int b) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="write(byte[])"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(byte[] b) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="write(byte[], int, int)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(byte[] b, int off, int len) throws java.io.IOException</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="checkLimits()"><!-- --></A><H3>checkLimits</H3><PRE>protected void <B>checkLimits</B>() throws <A HREF="../../../org/archive/io/RecorderTooMuchHeaderException.html" title="class in org.archive.io">RecorderTooMuchHeaderException</A></PRE><DL><DD>Check any enforced limits. For now, this only checks MAX_HEADER_MATERIAL if markContentBegin() has not yet been called.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../org/archive/io/RecorderTooMuchHeaderException.html" title="class in org.archive.io">RecorderTooMuchHeaderException</A></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.OutputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="closeDiskStream()"><!-- --></A><H3>closeDiskStream</H3><PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -