--- a/jdk/src/java.base/share/classes/java/io/File.java Wed Aug 05 12:19:38 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/File.java Thu Aug 06 13:20:13 2015 +0300
@@ -63,8 +63,8 @@
* pathname string, each name is separated from the next by a single copy of
* the default <em>separator character</em>. The default name-separator
* character is defined by the system property <code>file.separator</code>, and
- * is made available in the public static fields <code>{@link
- * #separator}</code> and <code>{@link #separatorChar}</code> of this class.
+ * is made available in the public static fields {@link
+ * #separator} and {@link #separatorChar} of this class.
* When a pathname string is converted into an abstract pathname, the names
* within it may be separated by the default name-separator character or by any
* other name-separator character that is supported by the underlying system.
@@ -82,11 +82,11 @@
* <p> The <em>parent</em> of an abstract pathname may be obtained by invoking
* the {@link #getParent} method of this class and consists of the pathname's
* prefix and each name in the pathname's name sequence except for the last.
- * Each directory's absolute pathname is an ancestor of any <tt>File</tt>
+ * Each directory's absolute pathname is an ancestor of any {@code File}
* object with an absolute abstract pathname which begins with the directory's
* absolute pathname. For example, the directory denoted by the abstract
- * pathname <tt>"/usr"</tt> is an ancestor of the directory denoted by the
- * pathname <tt>"/usr/local/bin"</tt>.
+ * pathname {@code "/usr"} is an ancestor of the directory denoted by the
+ * pathname {@code "/usr/local/bin"}.
*
* <p> The prefix concept is used to handle root directories on UNIX platforms,
* and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms,
@@ -217,7 +217,7 @@
/**
* The system-dependent default name-separator character, represented as a
* string for convenience. This string contains a single character, namely
- * <code>{@link #separatorChar}</code>.
+ * {@link #separatorChar}.
*/
public static final String separator = "" + separatorChar;
@@ -236,7 +236,7 @@
/**
* The system-dependent path-separator character, represented as a string
* for convenience. This string contains a single character, namely
- * <code>{@link #pathSeparatorChar}</code>.
+ * {@link #pathSeparatorChar}.
*/
public static final String pathSeparator = "" + pathSeparatorChar;
@@ -374,33 +374,34 @@
}
/**
- * Creates a new <tt>File</tt> instance by converting the given
- * <tt>file:</tt> URI into an abstract pathname.
+ * Creates a new {@code File} instance by converting the given
+ * {@code file:} URI into an abstract pathname.
*
- * <p> The exact form of a <tt>file:</tt> URI is system-dependent, hence
+ * <p> The exact form of a {@code file:} URI is system-dependent, hence
* the transformation performed by this constructor is also
* system-dependent.
*
* <p> For a given abstract pathname <i>f</i> it is guaranteed that
*
- * <blockquote><tt>
- * new File(</tt><i> f</i><tt>.{@link #toURI() toURI}()).equals(</tt><i> f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}())
- * </tt></blockquote>
+ * <blockquote><code>
+ * new File(</code><i> f</i><code>.{@link #toURI()
+ * toURI}()).equals(</code><i> f</i><code>.{@link #getAbsoluteFile() getAbsoluteFile}())
+ * </code></blockquote>
*
* so long as the original abstract pathname, the URI, and the new abstract
* pathname are all created in (possibly different invocations of) the same
* Java virtual machine. This relationship typically does not hold,
- * however, when a <tt>file:</tt> URI that is created in a virtual machine
+ * however, when a {@code file:} URI that is created in a virtual machine
* on one operating system is converted into an abstract pathname in a
* virtual machine on a different operating system.
*
* @param uri
* An absolute, hierarchical URI with a scheme equal to
- * <tt>"file"</tt>, a non-empty path component, and undefined
+ * {@code "file"}, a non-empty path component, and undefined
* authority, query, and fragment components
*
* @throws NullPointerException
- * If <tt>uri</tt> is <tt>null</tt>
+ * If {@code uri} is {@code null}
*
* @throws IllegalArgumentException
* If the preconditions on the parameter do not hold
@@ -533,7 +534,7 @@
* Returns the absolute pathname string of this abstract pathname.
*
* <p> If this abstract pathname is already absolute, then the pathname
- * string is simply returned as if by the <code>{@link #getPath}</code>
+ * string is simply returned as if by the {@link #getPath}
* method. If this abstract pathname is the empty abstract pathname then
* the pathname string of the current user directory, which is named by the
* system property <code>user.dir</code>, is returned. Otherwise this
@@ -581,7 +582,7 @@
* converts this pathname to absolute form if necessary, as if by invoking the
* {@link #getAbsolutePath} method, and then maps it to its unique form in a
* system-dependent way. This typically involves removing redundant names
- * such as <tt>"."</tt> and <tt>".."</tt> from the pathname, resolving
+ * such as {@code "."} and {@code ".."} from the pathname, resolving
* symbolic links (on UNIX platforms), and converting drive letters to a
* standard case (on Microsoft Windows platforms).
*
@@ -604,8 +605,8 @@
*
* @throws SecurityException
* If a required system property value cannot be accessed, or
- * if a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead}</code> method denies
+ * if a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead} method denies
* read access to the file
*
* @since 1.1
@@ -632,8 +633,8 @@
*
* @throws SecurityException
* If a required system property value cannot be accessed, or
- * if a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead}</code> method denies
+ * if a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead} method denies
* read access to the file
*
* @since 1.2
@@ -687,7 +688,7 @@
}
/**
- * Constructs a <tt>file:</tt> URI that represents this abstract pathname.
+ * Constructs a {@code file:} URI that represents this abstract pathname.
*
* <p> The exact form of the URI is system-dependent. If it can be
* determined that the file denoted by this abstract pathname is a
@@ -695,15 +696,16 @@
*
* <p> For a given abstract pathname <i>f</i>, it is guaranteed that
*
- * <blockquote><tt>
- * new {@link #File(java.net.URI) File}(</tt><i> f</i><tt>.toURI()).equals(</tt><i> f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}())
- * </tt></blockquote>
+ * <blockquote><code>
+ * new {@link #File(java.net.URI) File}(</code><i> f</i><code>.toURI()).equals(
+ * </code><i> f</i><code>.{@link #getAbsoluteFile() getAbsoluteFile}())
+ * </code></blockquote>
*
* so long as the original abstract pathname, the URI, and the new abstract
* pathname are all created in (possibly different invocations of) the same
* Java virtual machine. Due to the system-dependent nature of abstract
* pathnames, however, this relationship typically does not hold when a
- * <tt>file:</tt> URI that is created in a virtual machine on one operating
+ * {@code file:} URI that is created in a virtual machine on one operating
* system is converted into an abstract pathname in a virtual machine on a
* different operating system.
*
@@ -716,7 +718,7 @@
* may be used to obtain a {@code Path} representing this abstract pathname.
*
* @return An absolute, hierarchical URI with a scheme equal to
- * <tt>"file"</tt>, a path representing this abstract pathname,
+ * {@code "file"}, a path representing this abstract pathname,
* and undefined authority, query, and fragment components
* @throws SecurityException If a required system property value cannot
* be accessed.
@@ -753,8 +755,8 @@
* application; <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public boolean canRead() {
@@ -781,8 +783,8 @@
* <code>false</code> otherwise.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*/
public boolean canWrite() {
@@ -804,8 +806,8 @@
* by this abstract pathname exists; <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file or directory
*/
public boolean exists() {
@@ -834,8 +836,8 @@
* <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public boolean isDirectory() {
@@ -867,8 +869,8 @@
* <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public boolean isFile() {
@@ -894,8 +896,8 @@
* underlying platform
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*
* @since 1.2
@@ -928,8 +930,8 @@
* file does not exist or if an I/O error occurs
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public long lastModified() {
@@ -959,8 +961,8 @@
* denoting system-dependent entities such as devices or pipes.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public long length() {
@@ -997,8 +999,8 @@
* If an I/O error occurred
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.2
@@ -1026,8 +1028,8 @@
* successfully deleted; <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkDelete}</code> method denies
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkDelete} method denies
* delete access to the file
*/
public boolean delete() {
@@ -1060,8 +1062,8 @@
* facility should be used instead.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkDelete}</code> method denies
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkDelete} method denies
* delete access to the file
*
* @see #delete
@@ -1301,8 +1303,8 @@
* created; <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not permit the named directory to be created
*/
public boolean mkdir() {
@@ -1327,12 +1329,12 @@
* otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method does not permit verification of the existence of the
* named directory and all necessary parent directories; or if
- * the <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * the {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not permit the named directory and all necessary
* parent directories to be created
*/
@@ -1375,8 +1377,8 @@
* <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to either the old or new pathnames
*
* @throws NullPointerException
@@ -1405,7 +1407,7 @@
* but some provide more precision. The argument will be truncated to fit
* the supported precision. If the operation succeeds and no intervening
* operations on the file take place, then the next invocation of the
- * <code>{@link #lastModified}</code> method will return the (possibly
+ * {@link #lastModified} method will return the (possibly
* truncated) <code>time</code> argument that was passed to this method.
*
* @param time The new last-modified time, measured in milliseconds since
@@ -1417,8 +1419,8 @@
* @throws IllegalArgumentException If the argument is negative
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file
*
* @since 1.2
@@ -1448,8 +1450,8 @@
* <code>false</code> otherwise
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file
*
* @since 1.2
@@ -1491,8 +1493,8 @@
* the access permissions of this abstract pathname.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file
*
* @since 1.6
@@ -1514,11 +1516,12 @@
* machine with special privileges that allow it to modify files that
* disallow write operations.
*
- * <p> An invocation of this method of the form <tt>file.setWritable(arg)</tt>
+ * <p> An invocation of this method of the form {@code file.setWritable(arg)}
* behaves in exactly the same way as the invocation
*
- * <pre>
- * file.setWritable(arg, true) </pre>
+ * <pre>{@code
+ * file.setWritable(arg, true)
+ * }</pre>
*
* @param writable
* If <code>true</code>, sets the access permission to allow write
@@ -1529,8 +1532,8 @@
* change the access permissions of this abstract pathname.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1568,8 +1571,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1591,11 +1594,12 @@
* machine with special privileges that allow it to read files that are
* marked as unreadable.
*
- * <p>An invocation of this method of the form <tt>file.setReadable(arg)</tt>
+ * <p>An invocation of this method of the form {@code file.setReadable(arg)}
* behaves in exactly the same way as the invocation
*
- * <pre>
- * file.setReadable(arg, true) </pre>
+ * <pre>{@code
+ * file.setReadable(arg, true)
+ * }</pre>
*
* @param readable
* If <code>true</code>, sets the access permission to allow read
@@ -1609,8 +1613,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1648,8 +1652,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1671,11 +1675,12 @@
* virtual machine with special privileges that allow it to execute files
* that are not marked executable.
*
- * <p>An invocation of this method of the form <tt>file.setExcutable(arg)</tt>
+ * <p>An invocation of this method of the form {@code file.setExcutable(arg)}
* behaves in exactly the same way as the invocation
*
- * <pre>
- * file.setExecutable(arg, true) </pre>
+ * <pre>{@code
+ * file.setExecutable(arg, true)
+ * }</pre>
*
* @param executable
* If <code>true</code>, sets the access permission to allow execute
@@ -1689,8 +1694,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1710,8 +1715,8 @@
* <em>and</em> the application is allowed to execute the file
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkExec(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkExec(java.lang.String)}
* method denies execute access to the file
*
* @since 1.6
@@ -1783,12 +1788,12 @@
* Returns the size of the partition <a href="#partName">named</a> by this
* abstract pathname.
*
- * @return The size, in bytes, of the partition or <tt>0L</tt> if this
+ * @return The size, in bytes, of the partition or {@code 0L} if this
* abstract pathname does not name a partition
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt>
+ * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname
*
@@ -1819,14 +1824,14 @@
* makes no guarantee that write operations to this file system
* will succeed.
*
- * @return The number of unallocated bytes on the partition or <tt>0L</tt>
+ * @return The number of unallocated bytes on the partition or {@code 0L}
* if the abstract pathname does not name a partition. This
* value will be less than or equal to the total file system size
* returned by {@link #getTotalSpace}.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt>
+ * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname
*
@@ -1860,14 +1865,14 @@
* virtual machine. This method makes no guarantee that write operations
* to this file system will succeed.
*
- * @return The number of available bytes on the partition or <tt>0L</tt>
+ * @return The number of available bytes on the partition or {@code 0L}
* if the abstract pathname does not name a partition. On
* systems where this information is not available, this method
* will be equivalent to a call to {@link #getFreeSpace}.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt>
+ * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname
*
@@ -1939,7 +1944,7 @@
*
* This method provides only part of a temporary-file facility. To arrange
* for a file created by this method to be deleted automatically, use the
- * <code>{@link #deleteOnExit}</code> method.
+ * {@link #deleteOnExit} method.
*
* <p> The <code>prefix</code> argument must be at least three characters
* long. It is recommended that the prefix be a short, meaningful string
@@ -1987,8 +1992,8 @@
* @throws IOException If a file could not be created
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not allow a file to be created
*
* @since 1.2
@@ -2032,9 +2037,9 @@
/**
* Creates an empty file in the default temporary-file directory, using
* the given prefix and suffix to generate its name. Invoking this method
- * is equivalent to invoking <code>{@link #createTempFile(java.lang.String,
+ * is equivalent to invoking {@link #createTempFile(java.lang.String,
* java.lang.String, java.io.File)
- * createTempFile(prefix, suffix, null)}</code>.
+ * createTempFile(prefix, suffix, null)}.
*
* <p> The {@link
* java.nio.file.Files#createTempFile(String,String,java.nio.file.attribute.FileAttribute[])
@@ -2059,8 +2064,8 @@
* @throws IOException If a file could not be created
*
* @throws SecurityException
- * If a security manager exists and its <code>{@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not allow a file to be created
*
* @since 1.2
@@ -2136,7 +2141,7 @@
/**
* Returns the pathname string of this abstract pathname. This is just the
- * string returned by the <code>{@link #getPath}</code> method.
+ * string returned by the {@link #getPath} method.
*
* @return The string form of this abstract pathname
*/