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

📄 printstream.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a double and then terminate the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#println(float)">println</A></B>(float&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a float and then terminate the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#println(int)">println</A></B>(int&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print an integer and then terminate the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#println(long)">println</A></B>(long&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a long and then terminate the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#println(java.lang.Object)">println</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print an Object and then terminate the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#println(java.lang.String)">println</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a String and then terminate the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#setError()">setError</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the error state of the stream to <code>true</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;buf,      int&nbsp;off,      int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write <code>len</code> bytes from the specified byte array starting at offset <code>off</code> to this stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/io/PrintStream.html#write(int)">write</A></B>(int&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the specified byte to this stream.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterOutputStream"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.io.<A HREF="../../java/io/FilterOutputStream.html">FilterOutputStream</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/io/FilterOutputStream.html#write(byte[])">write</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="PrintStream(java.io.OutputStream)"><!-- --></A><H3>PrintStream</H3><PRE>public <B>PrintStream</B>(<A HREF="../../java/io/OutputStream.html">OutputStream</A>&nbsp;out)</PRE><DL><DD>Create a new print stream.  This stream will not flush automatically.<DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - The output stream to which values and objects will be                    printed<DT><B>See Also: </B><DD><A HREF="../../java/io/PrintWriter.html#PrintWriter(java.io.OutputStream)"><CODE>PrintWriter.PrintWriter(java.io.OutputStream)</CODE></A></DL></DD></DL><HR><A NAME="PrintStream(java.io.OutputStream, boolean)"><!-- --></A><H3>PrintStream</H3><PRE>public <B>PrintStream</B>(<A HREF="../../java/io/OutputStream.html">OutputStream</A>&nbsp;out,                   boolean&nbsp;autoFlush)</PRE><DL><DD>Create a new print stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - The output stream to which values and objects will be                    printed<DD><CODE>autoFlush</CODE> - A boolean; if true, the output buffer will be flushed                    whenever a byte array is written, one of the                    <code>println</code> methods is invoked, or a newline                    character or byte (<code>'\n'</code>) is written<DT><B>See Also: </B><DD><A HREF="../../java/io/PrintWriter.html#PrintWriter(java.io.OutputStream, boolean)"><CODE>PrintWriter.PrintWriter(java.io.OutputStream, boolean)</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="flush()"><!-- --></A><H3>flush</H3><PRE>public void <B>flush</B>()</PRE><DL><DD>Flush the stream.  This is done by writing any buffered output bytes to the underlying output stream and then flushing that stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/FilterOutputStream.html#flush()">flush</A></CODE> in class <CODE><A HREF="../../java/io/FilterOutputStream.html">FilterOutputStream</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/io/OutputStream.html#flush()"><CODE>OutputStream.flush()</CODE></A></DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()</PRE><DL><DD>Close the stream.  This is done by flushing the stream and then closing the underlying output stream.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/FilterOutputStream.html#close()">close</A></CODE> in class <CODE><A HREF="../../java/io/FilterOutputStream.html">FilterOutputStream</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/io/OutputStream.html#close()"><CODE>OutputStream.close()</CODE></A></DL></DD></DL><HR><A NAME="checkError()"><!-- --></A><H3>checkError</H3><PRE>public boolean <B>checkError</B>()</PRE><DL><DD>Flush the stream and check its error state.  The internal error state is set to <code>true</code> when the underlying output stream throws an <code>IOException</code> other than <code>InterruptedIOException</code>, and when the <code>setError</code> method is invoked.  If an operation on the underlying output stream throws an <code>InterruptedIOException</code>, then the <code>PrintStream</code> converts the exception back into an interrupt by doing: <pre>     Thread.currentThread().interrupt(); </pre> or the equivalent.<DD><DL><DT><B>Returns:</B><DD>True if and only if this stream has encountered an         <code>IOException</code> other than         <code>InterruptedIOException</code>, or the         <code>setError</code> method has been invoked</DL></DD></DL><HR><A NAME="setError()"><!-- --></A><H3>setError</H3><PRE>protected void <B>setError</B>()</PRE><DL><DD>Set the error state of the stream to <code>true</code>.<DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="write(int)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(int&nbsp;b)</PRE><DL><DD>Write the specified byte to this stream.  If the byte is a newline and automatic flushing is enabled then the <code>flush</code> method will be invoked. <p> Note that the byte is written as given; to write a character that will be translated according to the platform's default character encoding, use the <code>print(char)</code> or <code>println(char)</code> methods.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/FilterOutputStream.html#write(int)">write</A></CODE> in class <CODE><A HREF="../../java/io/FilterOutputStream.html">FilterOutputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - The byte to be written<DT><B>See Also: </B><DD><A HREF="../../java/io/PrintStream.html#print(char)"><CODE>print(char)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(char)"><CODE>println(char)</CODE></A></DL></DD></DL><HR><A NAME="write(byte[], int, int)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(byte[]&nbsp;buf,                  int&nbsp;off,                  int&nbsp;len)</PRE><DL><DD>Write <code>len</code> bytes from the specified byte array starting at offset <code>off</code> to this stream.  If automatic flushing is enabled then the <code>flush</code> method will be invoked. <p> Note that the bytes will be written as given; to write characters that will be translated according to the platform's default character encoding, use the <code>print(char)</code> or <code>println(char)</code> methods.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/FilterOutputStream.html#write(byte[], int, int)">write</A></CODE> in class <CODE><A HREF="../../java/io/FilterOutputStream.html">FilterOutputStream</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buf</CODE> - A byte array<DD><CODE>off</CODE> - Offset from which to start taking bytes<DD><CODE>len</CODE> - Number of bytes to write</DL></DD></DL><HR><A NAME="print(boolean)"><!-- --></A><H3>print</H3><PRE>public void <B>print</B>(boolean&nbsp;b)</PRE><DL><DD>Print a boolean value.  The string produced by <code><A HREF="../../java/lang/String.html#valueOf(boolean)"><CODE>String.valueOf(boolean)</CODE></A></code> is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the <code><A HREF="../../java/io/PrintStream.html#write(int)"><CODE>write(int)</CODE></A></code> method.<DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - The <code>boolean</code> to be printed</DL></DD></DL><HR><A NAME="print(char)"><!-- --></A><H3>print</H3><PRE>public void <B>print</B>(char&nbsp;c)</PRE><DL><DD>Print a character.  The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the <code><A HREF="../../java/io/PrintStream.html#write(int)"><CODE>write(int)</CODE></A></code> method.<DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - The <code>char</code> to be printed</DL></DD>

⌨️ 快捷键说明

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