--- a/src/java.base/share/classes/java/io/FileInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FileInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -30,13 +30,13 @@
/**
- * A <code>FileInputStream</code> obtains input bytes
+ * A {@code FileInputStream} obtains input bytes
* from a file in a file system. What files
* are available depends on the host environment.
*
- * <p><code>FileInputStream</code> is meant for reading streams of raw bytes
+ * <p>{@code FileInputStream} is meant for reading streams of raw bytes
* such as image data. For reading streams of characters, consider using
- * <code>FileReader</code>.
+ * {@code FileReader}.
*
* @apiNote
* To release resources used by this stream {@link #close} should be called
@@ -80,21 +80,21 @@
private volatile boolean closed;
/**
- * Creates a <code>FileInputStream</code> by
+ * Creates a {@code FileInputStream} by
* opening a connection to an actual file,
- * the file named by the path name <code>name</code>
- * in the file system. A new <code>FileDescriptor</code>
+ * the file named by the path name {@code name}
+ * in the file system. A new {@code FileDescriptor}
* object is created to represent this file
* connection.
* <p>
* First, if there is a security
- * manager, its <code>checkRead</code> method
- * is called with the <code>name</code> argument
+ * manager, its {@code checkRead} method
+ * is called with the {@code name} argument
* as its argument.
* <p>
* If the named file does not exist, is a directory rather than a regular
* file, or for some other reason cannot be opened for reading then a
- * <code>FileNotFoundException</code> is thrown.
+ * {@code FileNotFoundException} is thrown.
*
* @param name the system-dependent file name.
* @throws FileNotFoundException if the file does not exist,
@@ -102,7 +102,7 @@
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
- * <code>checkRead</code> method denies read access
+ * {@code checkRead} method denies read access
* to the file.
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@@ -111,21 +111,21 @@
}
/**
- * Creates a <code>FileInputStream</code> by
+ * Creates a {@code FileInputStream} by
* opening a connection to an actual file,
- * the file named by the <code>File</code>
- * object <code>file</code> in the file system.
- * A new <code>FileDescriptor</code> object
+ * the file named by the {@code File}
+ * object {@code file} in the file system.
+ * A new {@code FileDescriptor} object
* is created to represent this file connection.
* <p>
* First, if there is a security manager,
- * its <code>checkRead</code> method is called
- * with the path represented by the <code>file</code>
+ * its {@code checkRead} method is called
+ * with the path represented by the {@code file}
* argument as its argument.
* <p>
* If the named file does not exist, is a directory rather than a regular
* file, or for some other reason cannot be opened for reading then a
- * <code>FileNotFoundException</code> is thrown.
+ * {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for reading.
* @throws FileNotFoundException if the file does not exist,
@@ -133,7 +133,7 @@
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
- * <code>checkRead</code> method denies read access to the file.
+ * {@code checkRead} method denies read access to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@@ -157,26 +157,26 @@
}
/**
- * Creates a <code>FileInputStream</code> by using the file descriptor
- * <code>fdObj</code>, which represents an existing connection to an
+ * Creates a {@code FileInputStream} by using the file descriptor
+ * {@code fdObj}, which represents an existing connection to an
* actual file in the file system.
* <p>
- * If there is a security manager, its <code>checkRead</code> method is
- * called with the file descriptor <code>fdObj</code> as its argument to
+ * If there is a security manager, its {@code checkRead} method is
+ * called with the file descriptor {@code fdObj} as its argument to
* see if it's ok to read the file descriptor. If read access is denied
- * to the file descriptor a <code>SecurityException</code> is thrown.
+ * to the file descriptor a {@code SecurityException} is thrown.
* <p>
- * If <code>fdObj</code> is null then a <code>NullPointerException</code>
+ * If {@code fdObj} is null then a {@code NullPointerException}
* is thrown.
* <p>
- * This constructor does not throw an exception if <code>fdObj</code>
+ * This constructor does not throw an exception if {@code fdObj}
* is {@link java.io.FileDescriptor#valid() invalid}.
* However, if the methods are invoked on the resulting stream to attempt
- * I/O on the stream, an <code>IOException</code> is thrown.
+ * I/O on the stream, an {@code IOException} is thrown.
*
* @param fdObj the file descriptor to be opened for reading.
* @throws SecurityException if a security manager exists and its
- * <code>checkRead</code> method denies read access to the
+ * {@code checkRead} method denies read access to the
* file descriptor.
* @see SecurityManager#checkRead(java.io.FileDescriptor)
*/
@@ -217,7 +217,7 @@
* Reads a byte of data from this input stream. This method blocks
* if no input is yet available.
*
- * @return the next byte of data, or <code>-1</code> if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* file is reached.
* @throws IOException if an I/O error occurs.
*/
@@ -237,13 +237,13 @@
private native int readBytes(byte b[], int off, int len) throws IOException;
/**
- * Reads up to <code>b.length</code> bytes of data from this input
+ * Reads up to {@code b.length} bytes of data from this input
* stream into an array of bytes. This method blocks until some input
* is available.
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the file has been reached.
* @throws IOException if an I/O error occurs.
*/
@@ -252,21 +252,21 @@
}
/**
- * Reads up to <code>len</code> bytes of data from this input stream
- * into an array of bytes. If <code>len</code> is not zero, the method
+ * Reads up to {@code len} bytes of data from this input stream
+ * into an array of bytes. If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
- * bytes are read and <code>0</code> is returned.
+ * bytes are read and {@code 0} is returned.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in the destination array <code>b</code>
+ * @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the file has been reached.
- * @throws NullPointerException If <code>b</code> is <code>null</code>.
- * @throws IndexOutOfBoundsException If <code>off</code> is negative,
- * <code>len</code> is negative, or <code>len</code> is greater than
- * <code>b.length - off</code>
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
@@ -274,14 +274,14 @@
}
/**
- * Skips over and discards <code>n</code> bytes of data from the
+ * Skips over and discards {@code n} bytes of data from the
* input stream.
*
- * <p>The <code>skip</code> method may, for a variety of
+ * <p>The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
- * possibly <code>0</code>. If <code>n</code> is negative, the method
+ * possibly {@code 0}. If {@code n} is negative, the method
* will try to skip backwards. In case the backing file does not support
- * backward skip at its current position, an <code>IOException</code> is
+ * backward skip at its current position, an {@code IOException} is
* thrown. The actual number of bytes skipped is returned. If it skips
* forwards, it returns a positive value. If it skips backwards, it
* returns a negative value.
@@ -372,10 +372,10 @@
}
/**
- * Returns the <code>FileDescriptor</code>
+ * Returns the {@code FileDescriptor}
* object that represents the connection to
* the actual file in the file system being
- * used by this <code>FileInputStream</code>.
+ * used by this {@code FileInputStream}.
*
* @return the file descriptor object associated with this stream.
* @throws IOException if an I/O error occurs.