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

📄 system.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
public static void <B>arraycopy</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;src,                             int&nbsp;src_position,                             <A HREF="../../java/lang/Object.html">Object</A>&nbsp;dst,                             int&nbsp;dst_position,                             int&nbsp;length)</PRE><DL><DD>Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. A subsequence of array components are copied from the source  array referenced by <code>src</code> to the destination array  referenced by <code>dst</code>. The number of components copied is  equal to the <code>length</code> argument. The components at  positions <code>srcOffset</code> through  <code>srcOffset+length-1</code> in the source array are copied into  positions <code>dstOffset</code> through  <code>dstOffset+length-1</code>, respectively, of the destination  array.  <p> If the <code>src</code> and <code>dst</code> arguments refer to the  same array object, then the copying is performed as if the  components at positions <code>srcOffset</code> through  <code>srcOffset+length-1</code> were first copied to a temporary  array with <code>length</code> components and then the contents of  the temporary array were copied into positions  <code>dstOffset</code> through <code>dstOffset+length-1</code> of the  destination array.  <p> If <code>dst</code> is <code>null</code>, then a  <code>NullPointerException</code> is thrown. <p> If <code>src</code> is <code>null</code>, then a  <code>NullPointerException</code> is thrown and the destination array is not modified. <p> Otherwise, if any of the following is true, an  <code>ArrayStoreException</code> is thrown and the destination is  not modified:  <ul> <li>The <code>src</code> argument refers to an object that is not an      array.  <li>The <code>dst</code> argument refers to an object that is not an      array.  <li>The <code>src</code> argument and <code>dst</code> argument refer to      arrays whose component types are different primitive types.  <li>The <code>src</code> argument refers to an array with a primitive      component type and the <code>dst</code> argument refers to an array      with a reference component type.  <li>The <code>src</code> argument refers to an array with a reference      component type and the <code>dst</code> argument refers to an array      with a primitive component type.  </ul> <p> Otherwise, if any of the following is true, an  <code>IndexOutOfBoundsException</code> is  thrown and the destination is not modified:  <ul> <li>The <code>srcOffset</code> argument is negative.  <li>The <code>dstOffset</code> argument is negative.  <li>The <code>length</code> argument is negative.  <li><code>srcOffset+length</code> is greater than      <code>src.length</code>, the length of the source array.  <li><code>dstOffset+length</code> is greater than      <code>dst.length</code>, the length of the destination array.  </ul> <p> Otherwise, if any actual component of the source array from  position <code>srcOffset</code> through  <code>srcOffset+length-1</code> cannot be converted to the component  type of the destination array by assignment conversion, an  <code>ArrayStoreException</code> is thrown. In this case, let  <b><i>k</i></b> be the smallest nonnegative integer less than  length such that <code>src[srcOffset+</code><i>k</i><code>]</code>  cannot be converted to the component type of the destination  array; when the exception is thrown, source array components from  positions <code>srcOffset</code> through <code>srcOffset+</code><i>k</i><code>-1</code>  will already have been copied to destination array positions  <code>dstOffset</code> through <code>dstOffset+</code><i>k</I><code>-1</code> and no other  positions of the destination array will have been modified.  (Because of the restrictions already itemized, this paragraph effectively applies only to the situation where both  arrays have component types that are reference types.)<DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - the source array.<DD><CODE>src_position</CODE> - start position in the source array.<DD><CODE>dst</CODE> - the destination array.<DD><CODE>dst_position</CODE> - pos   start position in the destination data.<DD><CODE>length</CODE> - the number of array elements to be copied.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if copying would cause               access of data outside array bounds.<DD><CODE><A HREF="../../java/lang/ArrayStoreException.html">ArrayStoreException</A></CODE> - if an element in the <code>src</code>               array could not be stored into the <code>dest</code> array               because of a type mismatch.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if either <code>src</code> or                <code>dst</code> is <code>null</code>.</DL></DD></DL><HR><A NAME="identityHashCode(java.lang.Object)"><!-- --></A><H3>identityHashCode</H3><PRE>public static int <B>identityHashCode</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;x)</PRE><DL><DD>Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). The hashcode for the null reference is zero.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - object for which the hashCode is to be calculated<DT><B>Returns:</B><DD>the hashCode<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="getProperties()"><!-- --></A><H3>getProperties</H3><PRE>public static <A HREF="../../java/util/Properties.html">Properties</A> <B>getProperties</B>()</PRE><DL><DD>Determines the current system properties.  <p> First, if there is a security manager, its  <code>checkPropertiesAccess</code> method is called with no  arguments. This may result in a security exception.  <p> The current set of system properties for use by the  <A HREF="../../java/lang/System.html#getProperty(java.lang.String)"><CODE>getProperty(String)</CODE></A> method is returned as a  <code>Properties</code> object. If there is no current set of  system properties, a set of system properties is first created and  initialized. This set of system properties always includes values  for the following keys:  <table> <tr><th>Key</th>     <th>Description of Associated Value</th></tr> <tr><td><code>java.version</code></td>     <td>Java Runtime Environment version</td></tr> <tr><td><code>java.vendor</code></td>     <td>Java Runtime Environment vendor</td></tr <tr><td><code>java.vendor.url</code></td>     <td>Java vendor URL</td></tr> <tr><td><code>java.home</code></td>     <td>Java installation directory</td></tr> <tr><td><code>java.vm.specification.version</code></td>     <td>Java Virtual Machine specification version</td></tr> <tr><td><code>java.vm.specification.vendor</code></td>     <td>Java Virtual Machine specification vendor</td></tr> <tr><td><code>java.vm.specification.name</code></td>     <td>Java Virtual Machine specification name</td></tr> <tr><td><code>java.vm.version</code></td>     <td>Java Virtual Machine implementation version</td></tr> <tr><td><code>java.vm.vendor</code></td>     <td>Java Virtual Machine implementation vendor</td></tr> <tr><td><code>java.vm.name</code></td>     <td>Java Virtual Machine implementation name</td></tr> <tr><td><code>java.specification.version</code></td>     <td>Java Runtime Environment specification  version</td></tr> <tr><td><code>java.specification.vendor</code></td>     <td>Java Runtime Environment specification  vendor</td></tr> <tr><td><code>java.specification.name</code></td>     <td>Java Runtime Environment specification  name</td></tr> <tr><td><code>java.class.version</code></td>     <td>Java class format version number</td></tr> <tr><td><code>java.class.path</code></td>     <td>Java class path</td></tr> <tr><td><code>java.ext.dirs</code></td>     <td>Path of extension directory or directories</td></tr> <tr><td><code>os.name</code></td>     <td>Operating system name</td></tr> <tr><td><code>os.arch</code></td>     <td>Operating system architecture</td></tr> <tr><td><code>os.version</code></td>     <td>Operating system version</td></tr> <tr><td><code>file.separator</code></td>     <td>File separator ("/" on UNIX)</td></tr> <tr><td><code>path.separator</code></td>     <td>Path separator (":" on UNIX)</td></tr> <tr><td><code>line.separator</code></td>     <td>Line separator ("\n" on UNIX)</td></tr> <tr><td><code>user.name</code></td>     <td>User's account name</td></tr> <tr><td><code>user.home</code></td>     <td>User's home directory</td></tr> <tr><td><code>user.dir</code></td>     <td>User's current working directory</td></tr> </table> <p> Note that even if the security manager does not permit the  <code>getProperties</code> operation, it may choose to permit the  <A HREF="../../java/lang/System.html#getProperty(java.lang.String)"><CODE>getProperty(String)</CODE></A> operation.<DD><DL><DT><B>Returns:</B><DD>the system properties<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its               <code>checkPropertiesAccess</code> method doesn't allow access               to the system properties.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#setProperties(java.util.Properties)"><CODE>setProperties(java.util.Properties)</CODE></A>, <A HREF="../../java/lang/SecurityException.html"><CODE>SecurityException</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkPropertiesAccess()"><CODE>SecurityManager.checkPropertiesAccess()</CODE></A>, <A HREF="../../java/util/Properties.html"><CODE>Properties</CODE></A></DL></DD></DL><HR><A NAME="setProperties(java.util.Properties)"><!-- --></A><H3>setProperties</H3><PRE>public static void <B>setProperties</B>(<A HREF="../../java/util/Properties.html">Properties</A>&nbsp;props)</PRE><DL><DD>Sets the system properties to the <code>Properties</code>  argument.  <p> First, if there is a security manager, its  <code>checkPropertiesAccess</code> method is called with no  arguments. This may result in a security exception.  <p> The argument becomes the current set of system properties for use  by the <A HREF="../../java/lang/System.html#getProperty(java.lang.String)"><CODE>getProperty(String)</CODE></A> method. If the argument is  <code>null</code>, then the current set of system properties is  forgotten.<DD><DL><DT><B>Parameters:</B><DD><CODE>props</CODE> - the new system properties.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its               <code>checkPropertiesAccess</code> method doesn't allow access               to the system properties.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#getProperties()"><CODE>getProperties()</CODE></A>, <A HREF="../../java/util/Properties.html"><CODE>Properties</CODE></A>, <A HREF="../../java/lang/SecurityException.html"><CODE>SecurityException</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkPropertiesAccess()"><CODE>SecurityManager.checkPropertiesAccess()</CODE></A></DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public static <A HREF="../../java/lang/String.html">String</A> <B>getProperty</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;key)</PRE><DL><DD>Gets the system property indicated by the specified key.  <p> First, if there is a security manager, its  <code>checkPropertyAccess</code> method is called with the key as  its argument. This may result in a SecurityException.  <p> If there is no current set of system properties, a set of system  properties is first created and initialized in the same manner as  for the <code>getProperties</code> method.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the name of the system property.<DT><B>Returns:</B><DD>the string value of the system property,             or <code>null</code> if there is no property with that key.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its               <code>checkPropertyAccess</code> method doesn't allow              access to the specified system property.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>key</code> is             <code>null</code>.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>key</code> is empty.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#setProperty(java.lang.String, java.lang.String)"><CODE>setProperty(java.lang.String, java.lang.String)</CODE></A>, <A HREF="../../java/lang/SecurityException.html"><CODE>SecurityException</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkPropertyAccess(java.lang.String)"><CODE>SecurityManager.checkPropertyAccess(java.lang.String)</CODE></A>, <A HREF="../../java/lang/System.html#getProperties()"><CODE>getProperties()</CODE></A></DL></DD></DL><HR><A NAME="getProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public static <A HREF="../../java/lang/String.html">String</A> <B>getProperty</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;key,                                 <A HREF="../../java/lang/String.html">String</A>&nbsp;def)</PRE><DL><DD>Gets the system property indicated by the specified key.  <p> First, if there is a security manager, its  <code>checkPropertyAccess</code> method is called with the  <code>key</code> as its argument.  <p> If there is no current set of system properties, a set of system  properties is first created and initialized in the same manner as  for the <code>getProperties</code> method.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the name of the system property.<DD><CODE>def</CODE> - a default value.<DT><B>Returns:</B><DD>the string value of the system property,             or the default value if there is no property with that key.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its               <code>checkPropertyAccess</code> method doesn't allow             access to the specified system property.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>key</code> is             <code>null</code>.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>key</code> is empty.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#setProperty(java.lang.String, java.lang.String)"><CODE>setProperty(java.lang.String, java.lang.String)</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkPropertyAccess(java.lang.String)"><CODE>SecurityManager.checkPropertyAccess(java.lang.String)</CODE></A>, <A HREF="../../java/lang/System.html#getProperties()"><CODE>getProperties()</CODE></A></DL></DD></DL><HR>

⌨️ 快捷键说明

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