deprecated.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 664 行 · 第 1/3 页

HTML
664
字号
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>SecurityManager.</B><B><A HREF="../SecurityManager.html#getInCheck()">getInCheck</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>建议不使用该类安全检查。建议使用 <code>checkPermission</code> 调用。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.io.InputStream</CODE></FONT></TD><TD><CODE><B>Runtime.</B><B><A HREF="../Runtime.html#getLocalizedInputStream(java.io.InputStream)">getLocalizedInputStream</A></B>(java.io.InputStream&nbsp;in)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK&nbsp;1.1 开始,将本地编码字节流转换为 Unicode 字符流的首选方法是使用 <code>InputStreamReader</code> 和 <code>BufferedReader</code> 类。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD><TD><CODE><B>Runtime.</B><B><A HREF="../Runtime.html#getLocalizedOutputStream(java.io.OutputStream)">getLocalizedOutputStream</A></B>(java.io.OutputStream&nbsp;out)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK&nbsp;1.1 开始,将 Unicode 字符流转换为本地编码字节流的首选方法是使用 <code>OutputStreamWriter</code>、<code>BufferedWriter</code> 和 <code>PrintWriter</code> 类。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B>SecurityManager.</B><B><A HREF="../SecurityManager.html#inClass(java.lang.String)">inClass</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>建议不使用该类安全检查。建议使用 <code>checkPermission</code> 调用。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B>SecurityManager.</B><B><A HREF="../SecurityManager.html#inClassLoader()">inClassLoader</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>建议不使用该类安全检查。建议使用 <code>checkPermission</code> 调用。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>Character.</B><B><A HREF="../Character.html#isJavaLetter(char)">isJavaLetter</A></B>(char&nbsp;ch)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>用 isJavaIdentifierStart(char) 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>Character.</B><B><A HREF="../Character.html#isJavaLetterOrDigit(char)">isJavaLetterOrDigit</A></B>(char&nbsp;ch)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>用 isJavaIdentifierPart(char) 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>Character.</B><B><A HREF="../Character.html#isSpace(char)">isSpace</A></B>(char&nbsp;ch)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>用 isWhitespace(char) 取代。</I></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>Thread.</B><B><A HREF="../Thread.html#resume()">resume</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法只与 <A HREF="../Thread.html#suspend()"><CODE>Thread.suspend()</CODE></A> 一起使用,但 <A HREF="../Thread.html#suspend()"><CODE>Thread.suspend()</CODE></A> 已经遭到反对,因为它具有死锁倾向。有关更多信息,请参阅<a href="../../../../guide/misc/threadPrimitiveDeprecation.html">为何 Thread.stop、Thread.suspend 和 Thread.resume 遭到反对?</a>。</I></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>ThreadGroup.</B><B><A HREF="../ThreadGroup.html#resume()">resume</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>此方法只用于联合 <tt>Thread.suspend</tt> 和 <tt>ThreadGroup.suspend</tt> 时,因为它们所固有的容易导致死锁的特性,所以两者都已废弃。有关详细信息,请参阅 <A HREF="../Thread.html#suspend()"><CODE>Thread.suspend()</CODE></A>。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B>System.</B><B><A HREF="../System.html#runFinalizersOnExit(boolean)">runFinalizersOnExit</A></B>(boolean&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法具有固有的不安全性。它可能对正在使用的对象调用终结方法,而其他线程同时正在操作这些对象,从而导致不正确的行为或死锁。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B>Runtime.</B><B><A HREF="../Runtime.html#runFinalizersOnExit(boolean)">runFinalizersOnExit</A></B>(boolean&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>此方法本身具有不安全性。它可能对正在使用的对象调用终结方法,而其他线程正在操作这些对象,从而导致不正确的行为或死锁。</I></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>Thread.</B><B><A HREF="../Thread.html#stop()">stop</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法具有固有的不安全性。用 Thread.stop 来终止线程将释放它已经锁定的所有监视器(作为沿堆栈向上传播的未检查 <code>ThreadDeath</code> 异常的一个自然后果)。如果以前受这些监视器保护的任何对象都处于一种不一致的状态,则损坏的对象将对其他线程可见,这有可能导致任意的行为。<code>stop</code> 的许多使用都应由只修改某些变量以指示目标线程应该停止运行的代码来取代。目标线程应定期检查该变量,并且如果该变量指示它要停止运行,则从其运行方法依次返回。如果目标线程等待很长时间(例如基于一个条件变量),则应使用 <code>interrupt</code> 方法来中断该等待。有关更多信息,请参阅<a href="../../../../guide/misc/threadPrimitiveDeprecation.html">为何 Thread.stop、Thread.suspend 和 Thread.resume 遭到反对?</a>。</I></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>ThreadGroup.</B><B><A HREF="../ThreadGroup.html#stop()">stop</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>此方法具有固有的不安全性。有关详细信息,请参阅 <A HREF="../Thread.html#stop()"><CODE>Thread.stop()</CODE></A>。</I></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>Thread.</B><B><A HREF="../Thread.html#stop(java.lang.Throwable)">stop</A></B>(<A HREF="../Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法具有固有的不安全性。请参阅 <A HREF="../Thread.html#stop()"><CODE>Thread.stop()</CODE></A> 以获得详细信息。该方法的附加危险是它可用于生成目标线程未准备处理的异常(包括若没有该方法该线程不太可能抛出的已检查的异常)。有关更多信息,请参阅<a href="../../../../guide/misc/threadPrimitiveDeprecation.html">为何 Thread.stop、Thread.suspend 和 Thread.resume 遭到反对?</a>。</I></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>Thread.</B><B><A HREF="../Thread.html#suspend()">suspend</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法已经遭到反对,因为它具有固有的死锁倾向。如果目标线程挂起时在保护关键系统资源的监视器上保持有锁,则在目标线程重新开始以前任何线程都不能访问该资源。如果重新开始目标线程的线程想在调用 <code>resume</code> 之前锁定该监视器,则会发生死锁。这类死锁通常会证明自己是“冻结”的进程。有关更多信息,请参阅<a href="../../../../guide/misc/threadPrimitiveDeprecation.html">为何 Thread.stop、Thread.suspend 和 Thread.resume 遭到反对?</a>。</I></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>ThreadGroup.</B><B><A HREF="../ThreadGroup.html#suspend()">suspend</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>此方法容易导致死锁。有关详细信息,请参阅 <A HREF="../Thread.html#suspend()"><CODE>Thread.suspend()</CODE></A>。</I></TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">注释类型为 <A HREF="../Deprecated.html" title="java.lang 中的注释">Deprecated</A> 的 <A HREF="../package-summary.html">java.lang</A> 中的构造方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../String.html#String(byte[], int)">String</A></B>(byte[]&nbsp;ascii,       int&nbsp;hibyte)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法无法将字节正确转换为字符。从 JDK&#xA0;1.1 起,完成该转换的首选方法是通过 <code>String</code> 构造方法,该方法接受一个字符集名称或使用平台的默认字符集。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../String.html#String(byte[], int, int, int)">String</A></B>(byte[]&nbsp;ascii,       int&nbsp;hibyte,       int&nbsp;offset,       int&nbsp;count)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法无法将字节正确转换为字符。从 JDK&nbsp;1.1 开始,完成该转换的首选方法是通过 <code>String</code> 构造方法,它接受一个字符集名称,或者使用平台默认的字符集。</I></TD></TR></TABLE>&nbsp;<P><A NAME="java.util"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><A HREF="../../util/package-summary.html">java.util</A> 中 <A HREF="../Deprecated.html" title="java.lang 中的注释">Deprecated</A> 的使用</FONT></TH></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">注释类型为 <A HREF="../Deprecated.html" title="java.lang 中的注释">Deprecated</A> 的 <A HREF="../../util/package-summary.html">java.util</A> 中的方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B>Date.</B><B><A HREF="../../util/Date.html#getDate()">getDate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK 1.1 开始,由 <code>Calendar.get(Calendar.DAY_OF_MONTH)</code> 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B>Date.</B><B><A HREF="../../util/Date.html#getDay()">getDay</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK 1.1 开始,由 <code>Calendar.get(Calendar.DAY_OF_WEEK)</code> 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B>Date.</B><B><A HREF="../../util/Date.html#getHours()">getHours</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK 1.1 开始,由 <code>Calendar.get(Calendar.HOUR_OF_DAY)</code> 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B>Date.</B><B><A HREF="../../util/Date.html#getMinutes()">getMinutes</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK 1.1 开始,由 <code>Calendar.get(Calendar.MINUTE)</code> 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B>Date.</B><B><A HREF="../../util/Date.html#getMonth()">getMonth</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>从 JDK 1.1 开始,由 <code>Calendar.get(Calendar.MONTH)</code> 取代。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

⌨️ 快捷键说明

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