📄 pipedwriter.html
字号:
<!-- ========= 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="PipedWriter(java.io.PipedReader)"><!-- --></A><H3>PipedWriter</H3><PRE>public <B>PipedWriter</B>(<A HREF="../../java/io/PipedReader.html">PipedReader</A> snk) throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Creates a piped writer connected to the specified piped reader. Data characters written to this stream will then be available as input from <code>snk</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>snk</CODE> - The piped reader to connect to.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="PipedWriter()"><!-- --></A><H3>PipedWriter</H3><PRE>public <B>PipedWriter</B>()</PRE><DL><DD>Creates a piped writer that is not yet connected to a piped reader. It must be connected to a piped reader, either by the receiver or the sender, before being used.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/io/PipedReader.html#connect(java.io.PipedWriter)"><CODE>PipedReader.connect(java.io.PipedWriter)</CODE></A>, <A HREF="../../java/io/PipedWriter.html#connect(java.io.PipedReader)"><CODE>connect(java.io.PipedReader)</CODE></A></DL></DD></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="connect(java.io.PipedReader)"><!-- --></A><H3>connect</H3><PRE>public void <B>connect</B>(<A HREF="../../java/io/PipedReader.html">PipedReader</A> snk) throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Connects this piped writer to a receiver. If this object is already connected to some other piped reader, an <code>IOException</code> is thrown. <p> If <code>snk</code> is an unconnected piped reader and <code>src</code> is an unconnected piped writer, they may be connected by either the call: <blockquote><pre> src.connect(snk)</pre></blockquote> or the call: <blockquote><pre> snk.connect(src)</pre></blockquote> The two calls have the same effect.<DD><DL><DT><B>Parameters:</B><DD><CODE>snk</CODE> - the piped reader to connect to.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="write(int)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(int c) throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Writes the specified <code>char</code> to the piped output stream. If a thread was reading data characters from the connected piped input stream, but the thread is no longer alive, then an <code>IOException</code> is thrown. <p> Implements the <code>write</code> method of <code>Writer</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Writer.html#write(int)">write</A></CODE> in class <CODE><A HREF="../../java/io/Writer.html">Writer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the <code>char</code> to be written.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="write(char[], int, int)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(char[] cbuf, int off, int len) throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Writes <code>len</code> characters from the specified character array starting at offset <code>off</code> to this piped output stream. If a thread was reading data characters from the connected piped input stream, but the thread is no longer alive, then an <code>IOException</code> is thrown.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Writer.html#write(char[], int, int)">write</A></CODE> in class <CODE><A HREF="../../java/io/Writer.html">Writer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>cbuf</CODE> - the data.<DD><CODE>off</CODE> - the start offset in the data.<DD><CODE>len</CODE> - the number of characters to write.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="flush()"><!-- --></A><H3>flush</H3><PRE>public void <B>flush</B>() throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Flushes this output stream and forces any buffered output characters to be written out. This will notify any readers that characters are waiting in the pipe.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Writer.html#flush()">flush</A></CODE> in class <CODE><A HREF="../../java/io/Writer.html">Writer</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>() throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Closes this piped output stream and releases any system resources associated with this stream. This stream may no longer be used for writing characters.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/Writer.html#close()">close</A></CODE> in class <CODE><A HREF="../../java/io/Writer.html">Writer</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</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=2 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="class-use/PipedWriter.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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/io/PipedReader.html"><B>PREV CLASS</B></A> <A HREF="../../java/io/PrintStream.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="PipedWriter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_java.io.Writer">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: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -