You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/06/19 12:12:01 UTC
[commons-io] 02/02: Javadoc: Replace @code with @link
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 5577e8b5411b53905dad6b0d70601cef238baeae
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jun 19 08:11:52 2022 -0400
Javadoc: Replace @code with @link
---
.../org/apache/commons/io/ByteOrderParser.java | 4 +-
src/main/java/org/apache/commons/io/CopyUtils.java | 90 +++---
.../org/apache/commons/io/DirectoryWalker.java | 14 +-
.../org/apache/commons/io/FileCleaningTracker.java | 4 +-
.../org/apache/commons/io/FileDeleteStrategy.java | 4 +-
.../java/org/apache/commons/io/FileSystem.java | 8 +-
src/main/java/org/apache/commons/io/FileUtils.java | 337 +++++++++++----------
.../java/org/apache/commons/io/LineIterator.java | 24 +-
.../apache/commons/io/UncheckedIOExceptions.java | 2 +-
.../java/org/apache/commons/io/file/PathUtils.java | 78 ++---
.../commons/io/filefilter/AndFileFilter.java | 2 +-
.../io/filefilter/CanExecuteFileFilter.java | 2 +-
.../commons/io/filefilter/CanReadFileFilter.java | 2 +-
.../commons/io/filefilter/CanWriteFileFilter.java | 2 +-
.../commons/io/filefilter/DirectoryFileFilter.java | 2 +-
.../commons/io/filefilter/EmptyFileFilter.java | 2 +-
.../commons/io/filefilter/FileFileFilter.java | 2 +-
.../commons/io/filefilter/FileFilterUtils.java | 8 +-
.../commons/io/filefilter/HiddenFileFilter.java | 2 +-
.../apache/commons/io/filefilter/OrFileFilter.java | 4 +-
.../io/filefilter/SymbolicLinkFileFilter.java | 2 +-
.../apache/commons/io/function/IOBiConsumer.java | 4 +-
.../org/apache/commons/io/function/IOConsumer.java | 4 +-
.../commons/io/input/BoundedInputStream.java | 4 +-
.../commons/io/input/CharacterSetFilterReader.java | 2 +-
.../io/input/ClassLoaderObjectInputStream.java | 2 +-
.../commons/io/input/ObservableInputStream.java | 2 +-
.../apache/commons/io/input/QueueInputStream.java | 5 +-
.../java/org/apache/commons/io/input/Tailer.java | 4 +-
.../io/input/UncheckedFilterInputStream.java | 4 +-
.../commons/io/input/buffer/package-info.java | 4 +-
.../org/apache/commons/io/input/package-info.java | 2 +-
.../io/output/AbstractByteArrayOutputStream.java | 8 +-
.../commons/io/output/ByteArrayOutputStream.java | 9 +-
.../commons/io/output/FileWriterWithEncoding.java | 5 +-
.../commons/io/output/LockableFileWriter.java | 3 +-
.../org/apache/commons/io/output/NullWriter.java | 2 +-
.../commons/io/output/QueueOutputStream.java | 5 +-
.../io/output/ThresholdingOutputStream.java | 4 +-
.../UnsynchronizedByteArrayOutputStream.java | 9 +-
.../org/apache/commons/io/output/package-info.java | 3 +-
.../serialization/ValidatingObjectInputStream.java | 4 +-
42 files changed, 347 insertions(+), 337 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/ByteOrderParser.java b/src/main/java/org/apache/commons/io/ByteOrderParser.java
index bcf1e5ce..570a7718 100644
--- a/src/main/java/org/apache/commons/io/ByteOrderParser.java
+++ b/src/main/java/org/apache/commons/io/ByteOrderParser.java
@@ -41,10 +41,10 @@ public final class ByteOrderParser {
* </ul>
*
* @param value
- * the {@code String} containing the ByteOrder representation to be parsed
+ * the {@link String} containing the ByteOrder representation to be parsed
* @return the ByteOrder represented by the string argument
* @throws IllegalArgumentException
- * if the {@code String} containing the ByteOrder representation to be parsed is unknown.
+ * if the {@link String} containing the ByteOrder representation to be parsed is unknown.
*/
public static ByteOrder parseByteOrder(final String value) {
if (ByteOrder.BIG_ENDIAN.toString().equals(value)) {
diff --git a/src/main/java/org/apache/commons/io/CopyUtils.java b/src/main/java/org/apache/commons/io/CopyUtils.java
index b823028b..133cc8e4 100644
--- a/src/main/java/org/apache/commons/io/CopyUtils.java
+++ b/src/main/java/org/apache/commons/io/CopyUtils.java
@@ -31,9 +31,9 @@ import java.nio.charset.Charset;
/**
* This class provides static utility methods for buffered
- * copying between sources ({@code InputStream}, {@code Reader},
- * {@code String} and {@code byte[]}) and destinations
- * ({@code OutputStream}, {@code Writer}, {@code String} and
+ * copying between sources ({@link InputStream}, {@link Reader},
+ * {@link String} and {@code byte[]}) and destinations
+ * ({@link OutputStream}, {@link Writer}, {@link String} and
* {@code byte[]}).
* <p>
* Unless otherwise noted, these {@code copy} methods do <em>not</em>
@@ -114,9 +114,9 @@ import java.nio.charset.Charset;
public class CopyUtils {
/**
- * Copies bytes from a {@code byte[]} to an {@code OutputStream}.
+ * Copies bytes from a {@code byte[]} to an {@link OutputStream}.
* @param input the byte array to read from
- * @param output the {@code OutputStream} to write to
+ * @param output the {@link OutputStream} to write to
* @throws IOException In case of an I/O problem
*/
public static void copy(final byte[] input, final OutputStream output) throws IOException {
@@ -125,10 +125,10 @@ public class CopyUtils {
/**
* Copies and convert bytes from a {@code byte[]} to chars on a
- * {@code Writer}.
+ * {@link Writer}.
* The platform's default encoding is used for the byte-to-char conversion.
* @param input the byte array to read from
- * @param output the {@code Writer} to write to
+ * @param output the {@link Writer} to write to
* @throws IOException In case of an I/O problem
* @deprecated 2.5 use {@link #copy(byte[], Writer, String)} instead
*/
@@ -140,9 +140,9 @@ public class CopyUtils {
/**
* Copies and convert bytes from a {@code byte[]} to chars on a
- * {@code Writer}, using the specified encoding.
+ * {@link Writer}, using the specified encoding.
* @param input the byte array to read from
- * @param output the {@code Writer} to write to
+ * @param output the {@link Writer} to write to
* @param encoding The name of a supported character encoding. See the
* <a href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
@@ -154,10 +154,10 @@ public class CopyUtils {
}
/**
- * Copies bytes from an {@code InputStream} to an
- * {@code OutputStream}.
- * @param input the {@code InputStream} to read from
- * @param output the {@code OutputStream} to write to
+ * Copies bytes from an {@link InputStream} to an
+ * {@link OutputStream}.
+ * @param input the {@link InputStream} to read from
+ * @param output the {@link OutputStream} to write to
* @return the number of bytes copied
* @throws IOException In case of an I/O problem
*/
@@ -173,11 +173,11 @@ public class CopyUtils {
}
/**
- * Copies and convert bytes from an {@code InputStream} to chars on a
- * {@code Writer}.
+ * Copies and convert bytes from an {@link InputStream} to chars on a
+ * {@link Writer}.
* The platform's default encoding is used for the byte-to-char conversion.
- * @param input the {@code InputStream} to read from
- * @param output the {@code Writer} to write to
+ * @param input the {@link InputStream} to read from
+ * @param output the {@link Writer} to write to
* @throws IOException In case of an I/O problem
* @deprecated 2.5 use {@link #copy(InputStream, Writer, String)} instead
*/
@@ -192,10 +192,10 @@ public class CopyUtils {
}
/**
- * Copies and convert bytes from an {@code InputStream} to chars on a
- * {@code Writer}, using the specified encoding.
- * @param input the {@code InputStream} to read from
- * @param output the {@code Writer} to write to
+ * Copies and convert bytes from an {@link InputStream} to chars on a
+ * {@link Writer}, using the specified encoding.
+ * @param input the {@link InputStream} to read from
+ * @param output the {@link Writer} to write to
* @param encoding The name of a supported character encoding. See the
* <a href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
@@ -211,11 +211,11 @@ public class CopyUtils {
}
/**
- * Serialize chars from a {@code Reader} to bytes on an
- * {@code OutputStream}, and flush the {@code OutputStream}.
+ * Serialize chars from a {@link Reader} to bytes on an
+ * {@link OutputStream}, and flush the {@link OutputStream}.
* Uses the default platform encoding.
- * @param input the {@code Reader} to read from
- * @param output the {@code OutputStream} to write to
+ * @param input the {@link Reader} to read from
+ * @param output the {@link OutputStream} to write to
* @throws IOException In case of an I/O problem
* @deprecated 2.5 use {@link #copy(Reader, OutputStream, String)} instead
*/
@@ -233,10 +233,10 @@ public class CopyUtils {
}
/**
- * Serialize chars from a {@code Reader} to bytes on an
- * {@code OutputStream}, and flush the {@code OutputStream}.
- * @param input the {@code Reader} to read from
- * @param output the {@code OutputStream} to write to
+ * Serialize chars from a {@link Reader} to bytes on an
+ * {@link OutputStream}, and flush the {@link OutputStream}.
+ * @param input the {@link Reader} to read from
+ * @param output the {@link OutputStream} to write to
* @param encoding The name of a supported character encoding. See the
* <a href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
@@ -256,9 +256,9 @@ public class CopyUtils {
}
/**
- * Copies chars from a {@code Reader} to a {@code Writer}.
- * @param input the {@code Reader} to read from
- * @param output the {@code Writer} to write to
+ * Copies chars from a {@link Reader} to a {@link Writer}.
+ * @param input the {@link Reader} to read from
+ * @param output the {@link Writer} to write to
* @return the number of characters copied
* @throws IOException In case of an I/O problem
*/
@@ -277,12 +277,12 @@ public class CopyUtils {
}
/**
- * Serialize chars from a {@code String} to bytes on an
- * {@code OutputStream}, and
- * flush the {@code OutputStream}.
+ * Serialize chars from a {@link String} to bytes on an
+ * {@link OutputStream}, and
+ * flush the {@link OutputStream}.
* Uses the platform default encoding.
- * @param input the {@code String} to read from
- * @param output the {@code OutputStream} to write to
+ * @param input the {@link String} to read from
+ * @param output the {@link OutputStream} to write to
* @throws IOException In case of an I/O problem
* @deprecated 2.5 use {@link #copy(String, OutputStream, String)} instead
*/
@@ -301,11 +301,11 @@ public class CopyUtils {
}
/**
- * Serialize chars from a {@code String} to bytes on an
- * {@code OutputStream}, and
- * flush the {@code OutputStream}.
- * @param input the {@code String} to read from
- * @param output the {@code OutputStream} to write to
+ * Serialize chars from a {@link String} to bytes on an
+ * {@link OutputStream}, and
+ * flush the {@link OutputStream}.
+ * @param input the {@link String} to read from
+ * @param output the {@link OutputStream} to write to
* @param encoding The name of a supported character encoding. See the
* <a href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
@@ -326,9 +326,9 @@ public class CopyUtils {
}
/**
- * Copies chars from a {@code String} to a {@code Writer}.
- * @param input the {@code String} to read from
- * @param output the {@code Writer} to write to
+ * Copies chars from a {@link String} to a {@link Writer}.
+ * @param input the {@link String} to read from
+ * @param output the {@link Writer} to write to
* @throws IOException In case of an I/O problem
*/
public static void copy(final String input, final Writer output)
diff --git a/src/main/java/org/apache/commons/io/DirectoryWalker.java b/src/main/java/org/apache/commons/io/DirectoryWalker.java
index ffc4fd9c..2269c2af 100644
--- a/src/main/java/org/apache/commons/io/DirectoryWalker.java
+++ b/src/main/java/org/apache/commons/io/DirectoryWalker.java
@@ -40,8 +40,8 @@ import org.apache.commons.io.filefilter.TrueFileFilter;
* The following sections describe:
* </p>
* <ul>
- * <li><a href="#example">1. Example Implementation</a> - example {@code FileCleaner} implementation.</li>
- * <li><a href="#filter">2. Filter Example</a> - using {@link FileFilter}(s) with {@code DirectoryWalker}.</li>
+ * <li><a href="#example">1. Example Implementation</a> - example {@link FileCleaner} implementation.</li>
+ * <li><a href="#filter">2. Filter Example</a> - using {@link FileFilter}(s) with {@link DirectoryWalker}.</li>
* <li><a href="#cancel">3. Cancellation</a> - how to implement cancellation behavior.</li>
* </ul>
*
@@ -123,7 +123,7 @@ import org.apache.commons.io.filefilter.TrueFileFilter;
* </pre>
* <p>
* The third constructor option is to specify separate filters, one for directories and one for files. These are
- * combined internally to form the correct {@code FileFilter}, something which is very easy to get wrong when
+ * combined internally to form the correct {@link FileFilter}, something which is very easy to get wrong when
* attempted manually, particularly when trying to express constructs like 'any file in directories named docs'.
* </p>
* <p>
@@ -154,7 +154,7 @@ import org.apache.commons.io.filefilter.TrueFileFilter;
* implementation.
* </p>
* <p>
- * What {@code DirectoryWalker} does provide for cancellation is:
+ * What {@link DirectoryWalker} does provide for cancellation is:
* </p>
* <ul>
* <li>{@link CancelException} which can be thrown in any of the <i>lifecycle</i> methods to stop processing.</li>
@@ -269,7 +269,7 @@ public abstract class DirectoryWalker<T> {
private final int depth;
/**
- * Constructs a {@code CancelException} with
+ * Constructs a {@link CancelException} with
* the file and depth when cancellation occurred.
*
* @param file the file when the operation was cancelled, may be null
@@ -280,7 +280,7 @@ public abstract class DirectoryWalker<T> {
}
/**
- * Constructs a {@code CancelException} with
+ * Constructs a {@link CancelException} with
* an appropriate message and the file and depth when
* cancellation occurred.
*
@@ -377,7 +377,7 @@ public abstract class DirectoryWalker<T> {
/**
* Checks whether the walk has been cancelled by calling {@link #handleIsCancelled},
- * throwing a {@code CancelException} if it has.
+ * throwing a {@link CancelException} if it has.
* <p>
* Writers of subclasses should not normally call this method as it is called
* automatically by the walk of the tree. However, sometimes a single method,
diff --git a/src/main/java/org/apache/commons/io/FileCleaningTracker.java b/src/main/java/org/apache/commons/io/FileCleaningTracker.java
index 7016ef33..e4787c7c 100644
--- a/src/main/java/org/apache/commons/io/FileCleaningTracker.java
+++ b/src/main/java/org/apache/commons/io/FileCleaningTracker.java
@@ -127,11 +127,11 @@ public class FileCleaningTracker {
}
}
/**
- * Queue of {@code Tracker} instances being watched.
+ * Queue of {@link Tracker} instances being watched.
*/
ReferenceQueue<Object> q = new ReferenceQueue<>();
/**
- * Collection of {@code Tracker} instances in existence.
+ * Collection of {@link Tracker} instances in existence.
*/
final Collection<Tracker> trackers = Collections.synchronizedSet(new HashSet<>()); // synchronized
/**
diff --git a/src/main/java/org/apache/commons/io/FileDeleteStrategy.java b/src/main/java/org/apache/commons/io/FileDeleteStrategy.java
index 7a072780..6bc51076 100644
--- a/src/main/java/org/apache/commons/io/FileDeleteStrategy.java
+++ b/src/main/java/org/apache/commons/io/FileDeleteStrategy.java
@@ -105,7 +105,7 @@ public class FileDeleteStrategy {
/**
* Deletes the file object, which may be a file or a directory.
- * All {@code IOException}s are caught and false returned instead.
+ * All {@link IOException}s are caught and false returned instead.
* If the file does not exist or is null, true is returned.
* <p>
* Subclass writers should override {@link #doDelete(File)}, not this method.
@@ -129,7 +129,7 @@ public class FileDeleteStrategy {
* Actually deletes the file object, which may be a file or a directory.
* <p>
* This method is designed for subclasses to override.
- * The implementation may return either false or an {@code IOException}
+ * The implementation may return either false or an {@link IOException}
* when deletion fails. The {@link #delete(File)} and {@link #deleteQuietly(File)}
* methods will handle either response appropriately.
* A check has been made to ensure that the file will exist.
diff --git a/src/main/java/org/apache/commons/io/FileSystem.java b/src/main/java/org/apache/commons/io/FileSystem.java
index d42db03c..d91718bc 100644
--- a/src/main/java/org/apache/commons/io/FileSystem.java
+++ b/src/main/java/org/apache/commons/io/FileSystem.java
@@ -174,7 +174,7 @@ public enum FileSystem {
* Gets a System property, defaulting to {@code null} if the property cannot be read.
* </p>
* <p>
- * If a {@code SecurityException} is caught, the return value is {@code null} and a message is written to
+ * If a {@link SecurityException} is caught, the return value is {@code null} and a message is written to
* {@code System.err}.
* </p>
*
@@ -222,7 +222,7 @@ public enum FileSystem {
* <p>
* There is no restriction on the value of {@code start}. If it
* is negative, it has the same effect as if it were zero: the entire
- * {@code CharSequence} may be searched. If it is greater than
+ * {@link CharSequence} may be searched. If it is greater than
* the length of {@code cs}, it has the same effect as if it were
* equal to the length of {@code cs}: {@code -1} is returned.
* </p>
@@ -230,11 +230,11 @@ public enum FileSystem {
* (Unicode code units).
* </p>
*
- * @param cs the {@code CharSequence} to be processed, not null
+ * @param cs the {@link CharSequence} to be processed, not null
* @param searchChar the char to be searched for
* @param start the start index, negative starts at the string start
* @return the index where the search char was found, -1 if not found
- * @since 3.6 updated to behave more like {@code String}
+ * @since 3.6 updated to behave more like {@link String}
*/
private static int indexOf(final CharSequence cs, final int searchChar, int start) {
if (cs instanceof String) {
diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java
index e0829536..2951c333 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -16,6 +16,7 @@
*/
package org.apache.commons.io;
+import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileFilter;
@@ -189,7 +190,7 @@ public class FileUtils {
public static final BigInteger ONE_YB = ONE_KB_BI.multiply(ONE_ZB);
/**
- * An empty array of type {@code File}.
+ * An empty array of type {@link File}.
*/
public static final File[] EMPTY_FILE_ARRAY = {};
@@ -231,7 +232,7 @@ public class FileUtils {
*
* @param size the number of bytes
* @return a human-readable display value (includes units - EB, PB, TB, GB, MB, KB or bytes)
- * @throws NullPointerException if the given {@code BigInteger} is {@code null}.
+ * @throws NullPointerException if the given {@link BigInteger} is {@code null}.
* @see <a href="https://issues.apache.org/jira/browse/IO-226">IO-226 - should the rounding be changed?</a>
* @since 2.4
*/
@@ -299,7 +300,7 @@ public class FileUtils {
/**
* Computes the checksum of a file using the specified checksum object. Multiple files may be checked using one
- * {@code Checksum} instance if desired simply by reusing the same checksum object. For example:
+ * {@link Checksum} instance if desired simply by reusing the same checksum object. For example:
*
* <pre>
* long checksum = FileUtils.checksum(file, new CRC32()).getValue();
@@ -308,9 +309,9 @@ public class FileUtils {
* @param file the file to checksum, must not be {@code null}
* @param checksum the checksum object to be used, must not be {@code null}
* @return the checksum specified, updated with the content of the file
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws NullPointerException if the given {@code Checksum} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist or is not a file.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws NullPointerException if the given {@link Checksum} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist or is not a file.
* @throws IOException if an IO error occurs reading the file.
* @since 1.3
*/
@@ -330,8 +331,8 @@ public class FileUtils {
*
* @param file the file to checksum, must not be {@code null}
* @return the checksum value
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist or is not a file.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist or is not a file.
* @throws IOException if an IO error occurs reading the file.
* @since 1.3
*/
@@ -343,7 +344,7 @@ public class FileUtils {
* Cleans a directory without deleting it.
*
* @param directory directory to clean
- * @throws NullPointerException if the given {@code File} is {@code null}.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
* @throws IllegalArgumentException if directory does not exist or is not a directory.
* @throws IOException if an I/O error occurs.
* @see #forceDelete(File)
@@ -356,7 +357,7 @@ public class FileUtils {
* Cleans a directory without deleting it.
*
* @param directory directory to clean, must not be {@code null}
- * @throws NullPointerException if the given {@code File} is {@code null}.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
* @throws IllegalArgumentException if directory does not exist or is not a directory.
* @throws IOException if an I/O error occurs.
* @see #forceDeleteOnExit(File)
@@ -499,7 +500,7 @@ public class FileUtils {
*
* @param srcDir an existing directory to copy, must not be {@code null}.
* @param destDir the new directory, must not be {@code null}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -527,7 +528,7 @@ public class FileUtils {
* @param srcDir an existing directory to copy, must not be {@code null}.
* @param destDir the new directory, must not be {@code null}.
* @param preserveFileDate true if the file date of the copy should be the same as the original.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -576,7 +577,7 @@ public class FileUtils {
* @param srcDir an existing directory to copy, must not be {@code null}.
* @param destDir the new directory, must not be {@code null}.
* @param filter the filter to apply, null means copy all directories and files should be the same as the original.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -626,7 +627,7 @@ public class FileUtils {
* @param destDir the new directory, must not be {@code null}.
* @param filter the filter to apply, null means copy all directories and files.
* @param preserveFileDate true if the file date of the copy should be the same as the original.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -676,7 +677,7 @@ public class FileUtils {
* @param fileFilter the filter to apply, null means copy all directories and files
* @param preserveFileDate true if the file date of the copy should be the same as the original
* @param copyOptions options specifying how the copy should be done, for example {@link StandardCopyOption}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -723,7 +724,7 @@ public class FileUtils {
*
* @param sourceDir an existing directory to copy, must not be {@code null}.
* @param destinationDir the directory to place the copy in, must not be {@code null}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -750,7 +751,7 @@ public class FileUtils {
*
* @param srcFile an existing file to copy, must not be {@code null}.
* @param destFile the new file, must not be {@code null}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IOException if source or destination is invalid.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
* @throws IOException if the output file length is not the same as the input file length after the copy completes.
@@ -777,7 +778,7 @@ public class FileUtils {
* @param srcFile an existing file to copy, must not be {@code null}.
* @param destFile the new file, must not be {@code null}.
* @param preserveFileDate true if the file date of the copy should be the same as the original.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IOException if source or destination is invalid.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
* @throws IOException if the output file length is not the same as the input file length after the copy completes
@@ -808,7 +809,7 @@ public class FileUtils {
* @param destFile the new file, must not be {@code null}.
* @param preserveFileDate true if the file date of the copy should be the same as the original.
* @param copyOptions options specifying how the copy should be done, for example {@link StandardCopyOption}..
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileNotFoundException if the source does not exist.
* @throws IllegalArgumentException if source is not a file.
* @throws IOException if the output file length is not the same as the input file length after the copy completes.
@@ -831,7 +832,7 @@ public class FileUtils {
* @param srcFile an existing file to copy, must not be {@code null}.
* @param destFile the new file, must not be {@code null}.
* @param copyOptions options specifying how the copy should be done, for example {@link StandardCopyOption}..
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileNotFoundException if the source does not exist.
* @throws IllegalArgumentException if source is not a file.
* @throws IOException if the output file length is not the same as the input file length after the copy completes.
@@ -857,13 +858,13 @@ public class FileUtils {
}
/**
- * Copies bytes from a {@code File} to an {@code OutputStream}.
+ * Copies bytes from a {@link File} to an {@link OutputStream}.
* <p>
- * This method buffers the input internally, so there is no need to use a {@code BufferedInputStream}.
+ * This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
* </p>
*
- * @param input the {@code File} to read.
- * @param output the {@code OutputStream} to write.
+ * @param input the {@link File} to read.
+ * @param output the {@link OutputStream} to write.
* @return the number of bytes copied
* @throws NullPointerException if the File is {@code null}.
* @throws NullPointerException if the OutputStream is {@code null}.
@@ -891,7 +892,7 @@ public class FileUtils {
*
* @param srcFile an existing file to copy, must not be {@code null}.
* @param destDir the directory to place the copy in, must not be {@code null}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if source or destination is invalid.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
* @see #copyFile(File, File, boolean)
@@ -916,7 +917,7 @@ public class FileUtils {
* @param sourceFile an existing file to copy, must not be {@code null}.
* @param destinationDir the directory to place the copy in, must not be {@code null}.
* @param preserveFileDate true if the file date of the copy should be the same as the original.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
* @throws IOException if the output file length is not the same as the input file length after the copy completes.
* @see #copyFile(File, File, CopyOption...)
@@ -940,8 +941,8 @@ public class FileUtils {
* See {@link #copyToFile(InputStream, File)} for a method that does not close the input stream.
* </p>
*
- * @param source the {@code InputStream} to copy bytes from, must not be {@code null}, will be closed
- * @param destination the non-directory {@code File} to write bytes to
+ * @param source the {@link InputStream} to copy bytes from, must not be {@code null}, will be closed
+ * @param destination the non-directory {@link File} to write bytes to
* (possibly overwriting), must not be {@code null}
* @throws IOException if {@code destination} is a directory
* @throws IOException if {@code destination} cannot be written
@@ -974,7 +975,7 @@ public class FileUtils {
*
* @param sourceFile an existing file or directory to copy, must not be {@code null}.
* @param destinationDir the directory to place the copy in, must not be {@code null}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -1010,7 +1011,7 @@ public class FileUtils {
*
* @param sourceIterable a existing files to copy, must not be {@code null}.
* @param destinationDir the directory to place the copy in, must not be {@code null}.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IOException if source or destination is invalid.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
* @see #copyFileToDirectory(File, File)
@@ -1030,8 +1031,8 @@ public class FileUtils {
* {@link java.util.zip.ZipInputStream ZipInputStream}. See {@link #copyInputStreamToFile(InputStream, File)} for a
* method that closes the input stream.
*
- * @param inputStream the {@code InputStream} to copy bytes from, must not be {@code null}
- * @param file the non-directory {@code File} to write bytes to (possibly overwriting), must not be
+ * @param inputStream the {@link InputStream} to copy bytes from, must not be {@code null}
+ * @param file the non-directory {@link File} to write bytes to (possibly overwriting), must not be
* {@code null}
* @throws NullPointerException if the InputStream is {@code null}.
* @throws NullPointerException if the File is {@code null}.
@@ -1058,8 +1059,8 @@ public class FileUtils {
* with reasonable timeouts to prevent this.
* </p>
*
- * @param source the {@code URL} to copy bytes from, must not be {@code null}
- * @param destination the non-directory {@code File} to write bytes to
+ * @param source the {@link URL} to copy bytes from, must not be {@code null}
+ * @param destination the non-directory {@link File} to write bytes to
* (possibly overwriting), must not be {@code null}
* @throws IOException if {@code source} URL cannot be opened
* @throws IOException if {@code destination} is a directory
@@ -1080,8 +1081,8 @@ public class FileUtils {
* {@code destination} will be created if they don't already exist. {@code destination} will be
* overwritten if it already exists.
*
- * @param source the {@code URL} to copy bytes from, must not be {@code null}
- * @param destination the non-directory {@code File} to write bytes to (possibly overwriting), must not be
+ * @param source the {@link URL} to copy bytes from, must not be {@code null}
+ * @param destination the non-directory {@link File} to write bytes to (possibly overwriting), must not be
* {@code null}
* @param connectionTimeoutMillis the number of milliseconds until this method will timeout if no connection could
* be established to the {@code source}
@@ -1281,8 +1282,8 @@ public class FileUtils {
* @param child the file to consider as the child.
* @return true is the candidate leaf is under by the specified composite. False otherwise.
* @throws IOException if an IO error occurs while checking the files.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist or is not a directory.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist or is not a directory.
* @see FilenameUtils#directoryContains(String, String)
* @since 2.2
*/
@@ -1503,7 +1504,7 @@ public class FileUtils {
}
/**
- * Tests whether the specified {@code File} is a directory or not. Implemented as a
+ * Tests whether the specified {@link File} is a directory or not. Implemented as a
* null-safe delegate to {@code Files.isDirectory(Path path, LinkOption... options)}.
*
* @param file the path to the file.
@@ -1535,7 +1536,7 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code ChronoLocalDate}
+ * Tests if the specified {@link File} is newer than the specified {@link ChronoLocalDate}
* at the current time.
*
* <p>Note: The input date is assumed to be in the system default time-zone with the time
@@ -1544,10 +1545,10 @@ public class FileUtils {
* isFileNewer(file, chronoLocalDate.atTime(LocalTime.now(zoneId)), zoneId)} where
* {@code zoneId} is a valid {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDate the date reference.
- * @return true if the {@code File} exists and has been modified after the given
- * {@code ChronoLocalDate} at the current time.
+ * @return true if the {@link File} exists and has been modified after the given
+ * {@link ChronoLocalDate} at the current time.
* @throws NullPointerException if the file or local date is {@code null}.
*
* @since 2.8.0
@@ -1557,7 +1558,7 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code ChronoLocalDate}
+ * Tests if the specified {@link File} is newer than the specified {@link ChronoLocalDate}
* at the specified time.
*
* <p>Note: The input date and time are assumed to be in the system default time-zone. To use a
@@ -1565,11 +1566,11 @@ public class FileUtils {
* isFileNewer(file, chronoLocalDate.atTime(localTime), zoneId)} where {@code zoneId} is a valid
* {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDate the date reference.
* @param localTime the time reference.
- * @return true if the {@code File} exists and has been modified after the given
- * {@code ChronoLocalDate} at the given time.
+ * @return true if the {@link File} exists and has been modified after the given
+ * {@link ChronoLocalDate} at the given time.
* @throws NullPointerException if the file, local date or zone ID is {@code null}.
*
* @since 2.8.0
@@ -1581,7 +1582,7 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code ChronoLocalDateTime}
+ * Tests if the specified {@link File} is newer than the specified {@link ChronoLocalDateTime}
* at the system-default time zone.
*
* <p>Note: The input date and time is assumed to be in the system default time-zone. To use a
@@ -1589,10 +1590,10 @@ public class FileUtils {
* isFileNewer(file, chronoLocalDateTime, zoneId)} where {@code zoneId} is a valid
* {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDateTime the date reference.
- * @return true if the {@code File} exists and has been modified after the given
- * {@code ChronoLocalDateTime} at the system-default time zone.
+ * @return true if the {@link File} exists and has been modified after the given
+ * {@link ChronoLocalDateTime} at the system-default time zone.
* @throws NullPointerException if the file or local date time is {@code null}.
*
* @since 2.8.0
@@ -1602,14 +1603,14 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code ChronoLocalDateTime}
- * at the specified {@code ZoneId}.
+ * Tests if the specified {@link File} is newer than the specified {@link ChronoLocalDateTime}
+ * at the specified {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDateTime the date reference.
* @param zoneId the time zone.
- * @return true if the {@code File} exists and has been modified after the given
- * {@code ChronoLocalDateTime} at the given {@code ZoneId}.
+ * @return true if the {@link File} exists and has been modified after the given
+ * {@link ChronoLocalDateTime} at the given {@link ZoneId}.
* @throws NullPointerException if the file, local date time or zone ID is {@code null}.
*
* @since 2.8.0
@@ -1621,12 +1622,12 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code ChronoZonedDateTime}.
+ * Tests if the specified {@link File} is newer than the specified {@link ChronoZonedDateTime}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoZonedDateTime the date reference.
- * @return true if the {@code File} exists and has been modified after the given
- * {@code ChronoZonedDateTime}.
+ * @return true if the {@link File} exists and has been modified after the given
+ * {@link ChronoZonedDateTime}.
* @throws NullPointerException if the file or zoned date time is {@code null}.
*
* @since 2.8.0
@@ -1638,12 +1639,12 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code Date}.
+ * Tests if the specified {@link File} is newer than the specified {@link Date}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param date the date reference.
- * @return true if the {@code File} exists and has been modified
- * after the given {@code Date}.
+ * @return true if the {@link File} exists and has been modified
+ * after the given {@link Date}.
* @throws NullPointerException if the file or date is {@code null}.
*/
public static boolean isFileNewer(final File file, final Date date) {
@@ -1652,12 +1653,12 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the reference {@code File}.
+ * Tests if the specified {@link File} is newer than the reference {@link File}.
*
- * @param file the {@code File} of which the modification date must be compared.
- * @param reference the {@code File} of which the modification date is used.
- * @return true if the {@code File} exists and has been modified more
- * recently than the reference {@code File}.
+ * @param file the {@link File} of which the modification date must be compared.
+ * @param reference the {@link File} of which the modification date is used.
+ * @return true if the {@link File} exists and has been modified more
+ * recently than the reference {@link File}.
* @throws NullPointerException if the file or reference file is {@code null}.
* @throws IllegalArgumentException if the reference file doesn't exist.
*/
@@ -1667,11 +1668,11 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code FileTime}.
+ * Tests if the specified {@link File} is newer than the specified {@link FileTime}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param fileTime the file time reference.
- * @return true if the {@code File} exists and has been modified after the given {@code FileTime}.
+ * @return true if the {@link File} exists and has been modified after the given {@link FileTime}.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file or local date is {@code null}.
* @since 2.12.0
@@ -1682,11 +1683,11 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified {@code Instant}.
+ * Tests if the specified {@link File} is newer than the specified {@link Instant}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param instant the date reference.
- * @return true if the {@code File} exists and has been modified after the given {@code Instant}.
+ * @return true if the {@link File} exists and has been modified after the given {@link Instant}.
* @throws NullPointerException if the file or instant is {@code null}.
* @since 2.8.0
*/
@@ -1696,12 +1697,12 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is newer than the specified time reference.
+ * Tests if the specified {@link File} is newer than the specified time reference.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param timeMillis the time reference measured in milliseconds since the
* epoch (00:00:00 GMT, January 1, 1970).
- * @return true if the {@code File} exists and has been modified after the given time reference.
+ * @return true if the {@link File} exists and has been modified after the given time reference.
* @throws NullPointerException if the file is {@code null}.
*/
public static boolean isFileNewer(final File file, final long timeMillis) {
@@ -1710,7 +1711,7 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code ChronoLocalDate}
+ * Tests if the specified {@link File} is older than the specified {@link ChronoLocalDate}
* at the current time.
*
* <p>Note: The input date is assumed to be in the system default time-zone with the time
@@ -1719,10 +1720,10 @@ public class FileUtils {
* isFileOlder(file, chronoLocalDate.atTime(LocalTime.now(zoneId)), zoneId)} where
* {@code zoneId} is a valid {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDate the date reference.
- * @return true if the {@code File} exists and has been modified before the given
- * {@code ChronoLocalDate} at the current time.
+ * @return true if the {@link File} exists and has been modified before the given
+ * {@link ChronoLocalDate} at the current time.
* @throws NullPointerException if the file or local date is {@code null}.
* @see ZoneId#systemDefault()
* @see LocalTime#now()
@@ -1734,19 +1735,19 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code ChronoLocalDate}
- * at the specified {@code LocalTime}.
+ * Tests if the specified {@link File} is older than the specified {@link ChronoLocalDate}
+ * at the specified {@link LocalTime}.
*
* <p>Note: The input date and time are assumed to be in the system default time-zone. To use a
* non-default time-zone use the method {@link #isFileOlder(File, ChronoLocalDateTime, ZoneId)
* isFileOlder(file, chronoLocalDate.atTime(localTime), zoneId)} where {@code zoneId} is a valid
* {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDate the date reference.
* @param localTime the time reference.
- * @return true if the {@code File} exists and has been modified before the
- * given {@code ChronoLocalDate} at the specified time.
+ * @return true if the {@link File} exists and has been modified before the
+ * given {@link ChronoLocalDate} at the specified time.
* @throws NullPointerException if the file, local date or local time is {@code null}.
* @see ZoneId#systemDefault()
*
@@ -1759,7 +1760,7 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code ChronoLocalDateTime}
+ * Tests if the specified {@link File} is older than the specified {@link ChronoLocalDateTime}
* at the system-default time zone.
*
* <p>Note: The input date and time is assumed to be in the system default time-zone. To use a
@@ -1767,10 +1768,10 @@ public class FileUtils {
* isFileOlder(file, chronoLocalDateTime, zoneId)} where {@code zoneId} is a valid
* {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDateTime the date reference.
- * @return true if the {@code File} exists and has been modified before the given
- * {@code ChronoLocalDateTime} at the system-default time zone.
+ * @return true if the {@link File} exists and has been modified before the given
+ * {@link ChronoLocalDateTime} at the system-default time zone.
* @throws NullPointerException if the file or local date time is {@code null}.
* @see ZoneId#systemDefault()
*
@@ -1781,14 +1782,14 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code ChronoLocalDateTime}
- * at the specified {@code ZoneId}.
+ * Tests if the specified {@link File} is older than the specified {@link ChronoLocalDateTime}
+ * at the specified {@link ZoneId}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoLocalDateTime the date reference.
* @param zoneId the time zone.
- * @return true if the {@code File} exists and has been modified before the given
- * {@code ChronoLocalDateTime} at the given {@code ZoneId}.
+ * @return true if the {@link File} exists and has been modified before the given
+ * {@link ChronoLocalDateTime} at the given {@link ZoneId}.
* @throws NullPointerException if the file, local date time or zone ID is {@code null}.
*
* @since 2.8.0
@@ -1800,12 +1801,12 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code ChronoZonedDateTime}.
+ * Tests if the specified {@link File} is older than the specified {@link ChronoZonedDateTime}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param chronoZonedDateTime the date reference.
- * @return true if the {@code File} exists and has been modified before the given
- * {@code ChronoZonedDateTime}.
+ * @return true if the {@link File} exists and has been modified before the given
+ * {@link ChronoZonedDateTime}.
* @throws NullPointerException if the file or zoned date time is {@code null}.
*
* @since 2.8.0
@@ -1816,11 +1817,11 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code Date}.
+ * Tests if the specified {@link File} is older than the specified {@link Date}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param date the date reference.
- * @return true if the {@code File} exists and has been modified before the given {@code Date}.
+ * @return true if the {@link File} exists and has been modified before the given {@link Date}.
* @throws NullPointerException if the file or date is {@code null}.
*/
public static boolean isFileOlder(final File file, final Date date) {
@@ -1829,11 +1830,11 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the reference {@code File}.
+ * Tests if the specified {@link File} is older than the reference {@link File}.
*
- * @param file the {@code File} of which the modification date must be compared.
- * @param reference the {@code File} of which the modification date is used.
- * @return true if the {@code File} exists and has been modified before the reference {@code File}.
+ * @param file the {@link File} of which the modification date must be compared.
+ * @param reference the {@link File} of which the modification date is used.
+ * @return true if the {@link File} exists and has been modified before the reference {@link File}.
* @throws NullPointerException if the file or reference file is {@code null}.
* @throws IllegalArgumentException if the reference file doesn't exist.
*/
@@ -1843,11 +1844,11 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code FileTime}.
+ * Tests if the specified {@link File} is older than the specified {@link FileTime}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param fileTime the file time reference.
- * @return true if the {@code File} exists and has been modified before the given {@code FileTime}.
+ * @return true if the {@link File} exists and has been modified before the given {@link FileTime}.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file or local date is {@code null}.
* @since 2.12.0
@@ -1858,11 +1859,11 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified {@code Instant}.
+ * Tests if the specified {@link File} is older than the specified {@link Instant}.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param instant the date reference.
- * @return true if the {@code File} exists and has been modified before the given {@code Instant}.
+ * @return true if the {@link File} exists and has been modified before the given {@link Instant}.
* @throws NullPointerException if the file or instant is {@code null}.
* @since 2.8.0
*/
@@ -1872,12 +1873,12 @@ public class FileUtils {
}
/**
- * Tests if the specified {@code File} is older than the specified time reference.
+ * Tests if the specified {@link File} is older than the specified time reference.
*
- * @param file the {@code File} of which the modification date must be compared.
+ * @param file the {@link File} of which the modification date must be compared.
* @param timeMillis the time reference measured in milliseconds since the
* epoch (00:00:00 GMT, January 1, 1970).
- * @return true if the {@code File} exists and has been modified before the given time reference.
+ * @return true if the {@link File} exists and has been modified before the given time reference.
* @throws NullPointerException if the file is {@code null}.
*/
public static boolean isFileOlder(final File file, final long timeMillis) {
@@ -1886,7 +1887,7 @@ public class FileUtils {
}
/**
- * Tests whether the specified {@code File} is a regular file or not. Implemented as a
+ * Tests whether the specified {@link File} is a regular file or not. Implemented as a
* null-safe delegate to {@code Files.isRegularFile(Path path, LinkOption... options)}.
*
* @param file the path to the file.
@@ -2057,7 +2058,7 @@ public class FileUtils {
}
/**
- * Returns an Iterator for the lines in a {@code File} using the default encoding for the VM.
+ * Returns an Iterator for the lines in a {@link File} using the default encoding for the VM.
*
* @param file the file to open for input, must not be {@code null}
* @return an Iterator of the lines in the file, never {@code null}
@@ -2073,9 +2074,9 @@ public class FileUtils {
}
/**
- * Returns an Iterator for the lines in a {@code File}.
+ * Returns an Iterator for the lines in a {@link File}.
* <p>
- * This method opens an {@code InputStream} for the file.
+ * This method opens an {@link InputStream} for the file.
* When you have finished with the iterator you should close the stream
* to free internal resources. This can be done by using a try-with-resources block or calling the
* {@link LineIterator#close()} method.
@@ -2253,7 +2254,7 @@ public class FileUtils {
*
* @param srcDir the directory to be moved.
* @param destDir the destination directory.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -2283,7 +2284,7 @@ public class FileUtils {
* @param destDir the destination file.
* @param createDestDir If {@code true} create the destination directory, otherwise if {@code false} throw an
* IOException.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws IllegalArgumentException if the source or destination is invalid.
* @throws FileNotFoundException if the source does not exist.
* @throws IOException if an error occurs or setting the last-modified time didn't succeeded.
@@ -2314,7 +2315,7 @@ public class FileUtils {
*
* @param srcFile the file to be moved.
* @param destFile the destination file.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileExistsException if the destination file exists.
* @throws FileNotFoundException if the source file does not exist.
* @throws IOException if source or destination is invalid.
@@ -2334,7 +2335,7 @@ public class FileUtils {
* @param srcFile the file to be moved.
* @param destFile the destination file.
* @param copyOptions Copy options.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileExistsException if the destination file exists.
* @throws FileNotFoundException if the source file does not exist.
* @throws IOException if source or destination is invalid.
@@ -2362,7 +2363,7 @@ public class FileUtils {
* @param destDir the destination file.
* @param createDestDir If {@code true} create the destination directory, otherwise if {@code false} throw an
* IOException.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileExistsException if the destination file exists.
* @throws FileNotFoundException if the source file does not exist.
* @throws IOException if source or destination is invalid.
@@ -2389,7 +2390,7 @@ public class FileUtils {
* @param destDir the destination directory.
* @param createDestDir If {@code true} create the destination directory, otherwise if {@code false} throw an
* IOException.
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileExistsException if the directory or file exists in the destination directory.
* @throws FileNotFoundException if the source file does not exist.
* @throws IOException if source or destination is invalid.
@@ -2661,7 +2662,7 @@ public class FileUtils {
*
* @param file The file to test.
* @param name The parameter name to use in the exception message.
- * @throws NullPointerException if the given {@code File} is {@code null}.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
* @throws IllegalArgumentException if the file is not writable.
*/
private static void requireCanWrite(final File file, final String name) {
@@ -2672,13 +2673,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} is a directory.
+ * Requires that the given {@link File} is a directory.
*
- * @param directory The {@code File} to check.
+ * @param directory The {@link File} to check.
* @param name The parameter name to use in the exception message in case of null input or if the file is not a directory.
* @return the given directory.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist or is not a directory.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist or is not a directory.
*/
private static File requireDirectory(final File directory, final String name) {
Objects.requireNonNull(directory, name);
@@ -2689,13 +2690,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} exists and is a directory.
+ * Requires that the given {@link File} exists and is a directory.
*
- * @param directory The {@code File} to check.
+ * @param directory The {@link File} to check.
* @param name The parameter name to use in the exception message in case of null input.
* @return the given directory.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist or is not a directory.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist or is not a directory.
*/
private static File requireDirectoryExists(final File directory, final String name) {
requireExists(directory, name);
@@ -2704,13 +2705,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} is a directory if it exists.
+ * Requires that the given {@link File} is a directory if it exists.
*
- * @param directory The {@code File} to check.
+ * @param directory The {@link File} to check.
* @param name The parameter name to use in the exception message in case of null input.
* @return the given directory.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} exists but is not a directory.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} exists but is not a directory.
*/
private static File requireDirectoryIfExists(final File directory, final String name) {
Objects.requireNonNull(directory, name);
@@ -2737,13 +2738,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} exists and throws an {@link IllegalArgumentException} if it doesn't.
+ * Requires that the given {@link File} exists and throws an {@link IllegalArgumentException} if it doesn't.
*
- * @param file The {@code File} to check.
+ * @param file The {@link File} to check.
* @param fileParamName The parameter name to use in the exception message in case of {@code null} input.
* @return the given file.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist.
*/
private static File requireExists(final File file, final String fileParamName) {
Objects.requireNonNull(file, fileParamName);
@@ -2755,13 +2756,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} exists and throws an {@link FileNotFoundException} if it doesn't.
+ * Requires that the given {@link File} exists and throws an {@link FileNotFoundException} if it doesn't.
*
- * @param file The {@code File} to check.
+ * @param file The {@link File} to check.
* @param fileParamName The parameter name to use in the exception message in case of {@code null} input.
* @return the given file.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws FileNotFoundException if the given {@code File} does not exist.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws FileNotFoundException if the given {@link File} does not exist.
*/
private static File requireExistsChecked(final File file, final String fileParamName) throws FileNotFoundException {
Objects.requireNonNull(file, fileParamName);
@@ -2773,13 +2774,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} is a file.
+ * Requires that the given {@link File} is a file.
*
- * @param file The {@code File} to check.
+ * @param file The {@link File} to check.
* @param name The parameter name to use in the exception message.
* @return the given file.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist or is not a file.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist or is not a file.
*/
private static File requireFile(final File file, final String name) {
Objects.requireNonNull(file, name);
@@ -2794,7 +2795,7 @@ public class FileUtils {
*
* @param source the source file
* @param destination the destination
- * @throws NullPointerException if any of the given {@code File}s are {@code null}.
+ * @throws NullPointerException if any of the given {@link File}s are {@code null}.
* @throws FileNotFoundException if the source does not exist.
*/
private static void requireFileCopy(final File source, final File destination) throws FileNotFoundException {
@@ -2803,13 +2804,13 @@ public class FileUtils {
}
/**
- * Requires that the given {@code File} is a file if it exists.
+ * Requires that the given {@link File} is a file if it exists.
*
- * @param file The {@code File} to check.
+ * @param file The {@link File} to check.
* @param name The parameter name to use in the exception message in case of null input.
* @return the given directory.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does exists but is not a directory.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does exists but is not a directory.
*/
private static File requireFileIfExists(final File file, final String name) {
Objects.requireNonNull(file, name);
@@ -2958,7 +2959,7 @@ public class FileUtils {
}
/**
- * Converts from a {@code URL} to a {@code File}.
+ * Converts from a {@link URL} to a {@link File}.
* <p>
* From version 1.1 this method will decode the URL.
* Syntax such as {@code file:///my%20docs/file.txt} will be
@@ -2969,7 +2970,7 @@ public class FileUtils {
* </p>
*
* @param url the file URL to convert, {@code null} returns {@code null}
- * @return the equivalent {@code File} object, or {@code null}
+ * @return the equivalent {@link File} object, or {@code null}
* if the URL's protocol is not {@code file}
*/
public static File toFile(final URL url) {
@@ -2981,7 +2982,7 @@ public class FileUtils {
}
/**
- * Converts each of an array of {@code URL} to a {@code File}.
+ * Converts each of an array of {@link URL} to a {@link File}.
* <p>
* Returns an array of the same size as the input.
* If the input is {@code null}, an empty array is returned.
@@ -3065,7 +3066,7 @@ public class FileUtils {
}
/**
- * Converts each of an array of {@code File} to a {@code URL}.
+ * Converts each of an array of {@link File} to a {@link URL}.
* <p>
* Returns an array of the same size as the input.
* </p>
@@ -3282,7 +3283,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The default VM encoding and the default line ending will be used.
*
* @param file the file to write to
@@ -3297,7 +3298,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The default VM encoding and the default line ending will be used.
*
* @param file the file to write to
@@ -3313,7 +3314,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The default VM encoding and the specified line ending will be used.
*
* @param file the file to write to
@@ -3328,7 +3329,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The default VM encoding and the specified line ending will be used.
*
* @param file the file to write to
@@ -3345,7 +3346,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The specified character encoding and the default line ending will be used.
* <p>
* NOTE: As from v1.3, the parent directories of the file will be created
@@ -3365,7 +3366,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line, optionally appending.
+ * the specified {@link File} line by line, optionally appending.
* The specified character encoding and the default line ending will be used.
*
* @param file the file to write to
@@ -3383,7 +3384,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The specified character encoding and the line ending will be used.
* <p>
* NOTE: As from v1.3, the parent directories of the file will be created
@@ -3404,7 +3405,7 @@ public class FileUtils {
/**
* Writes the {@code toString()} value of each item in a collection to
- * the specified {@code File} line by line.
+ * the specified {@link File} line by line.
* The specified character encoding and the line ending will be used.
*
* @param file the file to write to
diff --git a/src/main/java/org/apache/commons/io/LineIterator.java b/src/main/java/org/apache/commons/io/LineIterator.java
index aff8b1ff..67fe5728 100644
--- a/src/main/java/org/apache/commons/io/LineIterator.java
+++ b/src/main/java/org/apache/commons/io/LineIterator.java
@@ -24,9 +24,9 @@ import java.util.Iterator;
import java.util.NoSuchElementException;
/**
- * An Iterator over the lines in a {@code Reader}.
+ * An Iterator over the lines in a {@link Reader}.
* <p>
- * {@code LineIterator} holds a reference to an open {@code Reader}.
+ * {@link LineIterator} holds a reference to an open {@link Reader}.
* When you have finished with the iterator you should close the reader
* to free internal resources. This can be done by closing the reader directly,
* or by calling the {@link #close()} or {@link #closeQuietly(LineIterator)}
@@ -52,7 +52,7 @@ public class LineIterator implements Iterator<String>, Closeable {
// N.B. This class deliberately does not implement Iterable, see https://issues.apache.org/jira/browse/IO-181
/**
- * Closes a {@code LineIterator} quietly.
+ * Closes a {@link LineIterator} quietly.
*
* @param iterator The iterator to close, or {@code null}.
* @deprecated As of 2.6 deprecated without replacement. Please use the try-with-resources statement or handle
@@ -72,9 +72,9 @@ public class LineIterator implements Iterator<String>, Closeable {
private boolean finished;
/**
- * Constructs an iterator of the lines for a {@code Reader}.
+ * Constructs an iterator of the lines for a {@link Reader}.
*
- * @param reader the {@code Reader} to read from, not null
+ * @param reader the {@link Reader} to read from, not null
* @throws IllegalArgumentException if the reader is null
*/
public LineIterator(final Reader reader) throws IllegalArgumentException {
@@ -89,13 +89,13 @@ public class LineIterator implements Iterator<String>, Closeable {
}
/**
- * Closes the underlying {@code Reader}.
+ * Closes the underlying {@link Reader}.
* This method is useful if you only want to process the first few
* lines of a larger file. If you do not close the iterator
- * then the {@code Reader} remains open.
+ * then the {@link Reader} remains open.
* This method can safely be called multiple times.
*
- * @throws IOException if closing the underlying {@code Reader} fails.
+ * @throws IOException if closing the underlying {@link Reader} fails.
*/
@Override
public void close() throws IOException {
@@ -105,8 +105,8 @@ public class LineIterator implements Iterator<String>, Closeable {
}
/**
- * Indicates whether the {@code Reader} has more lines.
- * If there is an {@code IOException} then {@link #close()} will
+ * Indicates whether the {@link Reader} has more lines.
+ * If there is an {@link IOException} then {@link #close()} will
* be called on this instance.
*
* @return {@code true} if the Reader has more lines
@@ -149,7 +149,7 @@ public class LineIterator implements Iterator<String>, Closeable {
}
/**
- * Returns the next line in the wrapped {@code Reader}.
+ * Returns the next line in the wrapped {@link Reader}.
*
* @return the next line from the input
* @throws NoSuchElementException if there is no line to return
@@ -160,7 +160,7 @@ public class LineIterator implements Iterator<String>, Closeable {
}
/**
- * Returns the next line in the wrapped {@code Reader}.
+ * Returns the next line in the wrapped {@link Reader}.
*
* @return the next line from the input
* @throws NoSuchElementException if there is no line to return
diff --git a/src/main/java/org/apache/commons/io/UncheckedIOExceptions.java b/src/main/java/org/apache/commons/io/UncheckedIOExceptions.java
index f8f2c500..24b4d2f0 100644
--- a/src/main/java/org/apache/commons/io/UncheckedIOExceptions.java
+++ b/src/main/java/org/apache/commons/io/UncheckedIOExceptions.java
@@ -47,7 +47,7 @@ public class UncheckedIOExceptions {
* <p>
* This method exists because there is no String constructor in {@link UncheckedIOException}.
* </p>
- * @param e cause the {@code IOException}.
+ * @param e cause the {@link IOException}.
* @param message the detail message.
*
* @return a new {@link UncheckedIOException}.
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java b/src/main/java/org/apache/commons/io/file/PathUtils.java
index ae59c81d..d0e1a57d 100644
--- a/src/main/java/org/apache/commons/io/file/PathUtils.java
+++ b/src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -238,9 +238,9 @@ public final class PathUtils {
}
/**
- * Compares the given {@code Path}'s last modified time to the given file time.
+ * Compares the given {@link Path}'s last modified time to the given file time.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param fileTime the time reference.
* @param options options indicating how to handle symbolic links.
* @return See {@link FileTime#compareTo(FileTime)}
@@ -843,7 +843,7 @@ public final class PathUtils {
}
/**
- * Tests whether the given {@code Path} is a directory or not. Implemented as a null-safe delegate to
+ * Tests whether the given {@link Path} is a directory or not. Implemented as a null-safe delegate to
* {@code Files.isDirectory(Path path, LinkOption... options)}.
*
* @param path the path to the file.
@@ -900,12 +900,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is newer than the given time reference.
+ * Tests if the given {@link Path} is newer than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param czdt the time reference.
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified after the given time reference.
+ * @return true if the {@link Path} exists and has been modified after the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.12.0
@@ -916,12 +916,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is newer than the given time reference.
+ * Tests if the given {@link Path} is newer than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param fileTime the time reference.
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified after the given time reference.
+ * @return true if the {@link Path} exists and has been modified after the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.12.0
@@ -934,12 +934,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is newer than the given time reference.
+ * Tests if the given {@link Path} is newer than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param instant the time reference.
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified after the given time reference.
+ * @return true if the {@link Path} exists and has been modified after the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.12.0
@@ -949,12 +949,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is newer than the given time reference.
+ * Tests if the given {@link Path} is newer than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param timeMillis the time reference measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified after the given time reference.
+ * @return true if the {@link Path} exists and has been modified after the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.9.0
@@ -964,11 +964,11 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is newer than the reference {@code Path}.
+ * Tests if the given {@link Path} is newer than the reference {@link Path}.
*
- * @param file the {@code File} to test.
- * @param reference the {@code File} of which the modification date is used.
- * @return true if the {@code File} exists and has been modified more recently than the reference {@code File}.
+ * @param file the {@link File} to test.
+ * @param reference the {@link File} of which the modification date is used.
+ * @return true if the {@link File} exists and has been modified more recently than the reference {@link File}.
* @throws IOException if an I/O error occurs.
* @since 2.12.0
*/
@@ -977,12 +977,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is older than the given time reference.
+ * Tests if the given {@link Path} is older than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param fileTime the time reference.
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified before the given time reference.
+ * @return true if the {@link Path} exists and has been modified before the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.12.0
@@ -995,12 +995,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is older than the given time reference.
+ * Tests if the given {@link Path} is older than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param instant the time reference.
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified before the given time reference.
+ * @return true if the {@link Path} exists and has been modified before the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.12.0
@@ -1010,12 +1010,12 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is older than the given time reference.
+ * Tests if the given {@link Path} is older than the given time reference.
*
- * @param file the {@code Path} to test.
+ * @param file the {@link Path} to test.
* @param timeMillis the time reference measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)
* @param options options indicating how to handle symbolic links.
- * @return true if the {@code Path} exists and has been modified before the given time reference.
+ * @return true if the {@link Path} exists and has been modified before the given time reference.
* @throws IOException if an I/O error occurs.
* @throws NullPointerException if the file is {@code null}.
* @since 2.12.0
@@ -1025,11 +1025,11 @@ public final class PathUtils {
}
/**
- * Tests if the given {@code Path} is older than the reference {@code Path}.
+ * Tests if the given {@link Path} is older than the reference {@link Path}.
*
- * @param file the {@code File} to test.
- * @param reference the {@code File} of which the modification date is used.
- * @return true if the {@code File} exists and has been modified before than the reference {@code File}.
+ * @param file the {@link File} to test.
+ * @param reference the {@link File} of which the modification date is used.
+ * @return true if the {@link File} exists and has been modified before than the reference {@link File}.
* @throws IOException if an I/O error occurs.
* @since 2.12.0
*/
@@ -1050,7 +1050,7 @@ public final class PathUtils {
}
/**
- * Tests whether the given {@code Path} is a regular file or not. Implemented as a null-safe delegate to
+ * Tests whether the given {@link Path} is a regular file or not. Implemented as a null-safe delegate to
* {@code Files.isRegularFile(Path path, LinkOption... options)}.
*
* @param path the path to the file.
@@ -1129,9 +1129,9 @@ public final class PathUtils {
* Reads the BasicFileAttributes from the given path. Returns null instead of throwing
* {@link UnsupportedOperationException}. Throws {@link UncheckedIO} instead of {@link IOException}.
*
- * @param <A> The {@code BasicFileAttributes} type
+ * @param <A> The {@link BasicFileAttributes} type
* @param path The Path to test.
- * @param type the {@code Class} of the file attributes required to read.
+ * @param type the {@link Class} of the file attributes required to read.
* @param options options indicating how to handle symbolic links.
* @return the file attributes.
* @see Files#readAttributes(Path, Class, LinkOption...)
@@ -1264,14 +1264,14 @@ public final class PathUtils {
}
/**
- * Requires that the given {@code File} exists and throws an {@link IllegalArgumentException} if it doesn't.
+ * Requires that the given {@link File} exists and throws an {@link IllegalArgumentException} if it doesn't.
*
- * @param file The {@code File} to check.
+ * @param file The {@link File} to check.
* @param fileParamName The parameter name to use in the exception message in case of {@code null} input.
* @param options options indicating how to handle symbolic links.
* @return the given file.
- * @throws NullPointerException if the given {@code File} is {@code null}.
- * @throws IllegalArgumentException if the given {@code File} does not exist.
+ * @throws NullPointerException if the given {@link File} is {@code null}.
+ * @throws IllegalArgumentException if the given {@link File} does not exist.
*/
private static Path requireExists(final Path file, final String fileParamName, final LinkOption... options) {
Objects.requireNonNull(file, fileParamName);
diff --git a/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java
index 56135ac0..163c9940 100644
--- a/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java
@@ -97,7 +97,7 @@ public class AndFileFilter
}
/**
- * Constructs a new instance of {@code AndFileFilter}
+ * Constructs a new instance of {@link AndFileFilter}
* with the specified list of filters.
*
* @param fileFilters a List of IOFileFilter instances, copied.
diff --git a/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java
index da086885..96e8b31a 100644
--- a/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/CanExecuteFileFilter.java
@@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that can be executed.
+ * This filter accepts {@link File}s that can be executed.
* <p>
* Example, showing how to print out a list of the
* current directory's <i>executable</i> files:
diff --git a/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java
index 8c8e5f84..a30dfae6 100644
--- a/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/CanReadFileFilter.java
@@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that can be read.
+ * This filter accepts {@link File}s that can be read.
* <p>
* Example, showing how to print out a list of the current directory's <i>readable</i> files:
* </p>
diff --git a/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java
index d4e2b6b7..d5580278 100644
--- a/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java
@@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that can be written to.
+ * This filter accepts {@link File}s that can be written to.
* <p>
* Example, showing how to print out a list of the current directory's <i>writable</i> files:
* </p>
diff --git a/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java
index de3394d3..1a5e2fa0 100644
--- a/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java
@@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that are directories.
+ * This filter accepts {@link File}s that are directories.
* <p>
* For example, here is how to print out a list of the current directory's subdirectories:
* </p>
diff --git a/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java
index 55daa9c9..76d3c5d2 100644
--- a/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java
@@ -30,7 +30,7 @@ import org.apache.commons.io.IOUtils;
/**
* This filter accepts files or directories that are empty.
* <p>
- * If the {@code File} is a directory it checks that it contains no files.
+ * If the {@link File} is a directory it checks that it contains no files.
* </p>
* <p>
* Example, showing how to print out a list of the current directory's empty files/directories:
diff --git a/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java
index a15dd8d2..9cadb64f 100644
--- a/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java
@@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that are files (not directories).
+ * This filter accepts {@link File}s that are files (not directories).
* <p>
* For example, here is how to print out a list of the real files
* within the current directory:
diff --git a/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java b/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java
index 3ac8bb71..b62e21c4 100644
--- a/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java
+++ b/src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java
@@ -164,8 +164,8 @@ public class FileFilterUtils {
}
/**
- * Returns an {@code IOFileFilter} that wraps the
- * {@code FileFilter} instance.
+ * Returns an {@link IOFileFilter} that wraps the
+ * {@link FileFilter} instance.
*
* @param filter the filter to be wrapped
* @return a new filter that implements IOFileFilter
@@ -176,8 +176,8 @@ public class FileFilterUtils {
}
/**
- * Returns an {@code IOFileFilter} that wraps the
- * {@code FilenameFilter} instance.
+ * Returns an {@link IOFileFilter} that wraps the
+ * {@link FilenameFilter} instance.
*
* @param filter the filter to be wrapped
* @return a new filter that implements IOFileFilter
diff --git a/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java
index 8fa79405..4f161a30 100644
--- a/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java
@@ -25,7 +25,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that are hidden.
+ * This filter accepts {@link File}s that are hidden.
* <p>
* Example, showing how to print out a list of the
* current directory's <i>hidden</i> files:
diff --git a/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java
index 80a92acd..1c612542 100644
--- a/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java
@@ -42,7 +42,7 @@ public class OrFileFilter extends AbstractFileFilter implements ConditionalFileF
private final List<IOFileFilter> fileFilters;
/**
- * Constructs a new instance of {@code OrFileFilter}.
+ * Constructs a new instance of {@link OrFileFilter}.
*
* @since 1.1
*/
@@ -93,7 +93,7 @@ public class OrFileFilter extends AbstractFileFilter implements ConditionalFileF
}
/**
- * Constructs a new instance of {@code OrFileFilter} with the specified filters.
+ * Constructs a new instance of {@link OrFileFilter} with the specified filters.
*
* @param fileFilters the file filters for this filter, copied.
* @since 1.1
diff --git a/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java
index e3a30bd6..6dee2699 100644
--- a/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java
@@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
- * This filter accepts {@code File}s that are symbolic links.
+ * This filter accepts {@link File}s that are symbolic links.
* <p>
* For example, here is how to print out a list of the real files
* within the current directory:
diff --git a/src/main/java/org/apache/commons/io/function/IOBiConsumer.java b/src/main/java/org/apache/commons/io/function/IOBiConsumer.java
index 58cf79d1..d77edda1 100644
--- a/src/main/java/org/apache/commons/io/function/IOBiConsumer.java
+++ b/src/main/java/org/apache/commons/io/function/IOBiConsumer.java
@@ -43,12 +43,12 @@ public interface IOBiConsumer<T, U> {
void accept(T t, U u) throws IOException;
/**
- * Returns a composed {@code BiConsumer} that performs, in sequence, this operation followed by the {@code after}
+ * Returns a composed {@link BiConsumer} that performs, in sequence, this operation followed by the {@code after}
* operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation.
* If performing this operation throws an exception, the {@code after} operation will not be performed.
*
* @param after the operation to perform after this operation
- * @return a composed {@code BiConsumer} that performs in sequence this operation followed by the {@code after}
+ * @return a composed {@link BiConsumer} that performs in sequence this operation followed by the {@code after}
* operation
* @throws NullPointerException if {@code after} is null
*/
diff --git a/src/main/java/org/apache/commons/io/function/IOConsumer.java b/src/main/java/org/apache/commons/io/function/IOConsumer.java
index 662cd34d..bd52b607 100644
--- a/src/main/java/org/apache/commons/io/function/IOConsumer.java
+++ b/src/main/java/org/apache/commons/io/function/IOConsumer.java
@@ -86,12 +86,12 @@ public interface IOConsumer<T> {
void accept(T t) throws IOException;
/**
- * Returns a composed {@code IOConsumer} that performs, in sequence, this operation followed by the {@code after}
+ * Returns a composed {@link IOConsumer} that performs, in sequence, this operation followed by the {@code after}
* operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation.
* If performing this operation throws an exception, the {@code after} operation will not be performed.
*
* @param after the operation to perform after this operation
- * @return a composed {@code Consumer} that performs in sequence this operation followed by the {@code after} operation
+ * @return a composed {@link Consumer} that performs in sequence this operation followed by the {@code after} operation
* @throws NullPointerException if {@code after} is null
*/
default IOConsumer<T> andThen(final IOConsumer<? super T> after) {
diff --git a/src/main/java/org/apache/commons/io/input/BoundedInputStream.java b/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
index f09a6ee2..ab532d54 100644
--- a/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
@@ -53,7 +53,7 @@ public class BoundedInputStream extends InputStream {
private boolean propagateClose = true;
/**
- * Creates a new {@code BoundedInputStream} that wraps the given input
+ * Creates a new {@link BoundedInputStream} that wraps the given input
* stream and is unlimited.
*
* @param in The wrapped input stream
@@ -63,7 +63,7 @@ public class BoundedInputStream extends InputStream {
}
/**
- * Creates a new {@code BoundedInputStream} that wraps the given input
+ * Creates a new {@link BoundedInputStream} that wraps the given input
* stream and limits it to a certain size.
*
* @param in The wrapped input stream
diff --git a/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java b/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java
index 0634c322..a5cb4f85 100644
--- a/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java
+++ b/src/main/java/org/apache/commons/io/input/CharacterSetFilterReader.java
@@ -27,7 +27,7 @@ import java.util.function.IntPredicate;
* A filter reader that removes a given set of characters represented as {@code int} code points, handy to remove known
* junk characters from CSV files for example.
* <p>
- * This class must convert each {@code int} read to an {@code Integer}. You can increase the Integer cache with a system
+ * This class must convert each {@code int} read to an {@link Integer}. You can increase the Integer cache with a system
* property, see {@link Integer}.
* </p>
*/
diff --git a/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java b/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
index 7295f9a3..ce2be401 100644
--- a/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java
@@ -25,7 +25,7 @@ import java.lang.reflect.Proxy;
/**
* A special ObjectInputStream that loads a class based on a specified
- * {@code ClassLoader} rather than the system default.
+ * {@link ClassLoader} rather than the system default.
* <p>
* This is useful in dynamic container environments.
* </p>
diff --git a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java b/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
index b0f64821..e1b3b631 100644
--- a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
@@ -43,7 +43,7 @@ import org.apache.commons.io.IOUtils;
public class ObservableInputStream extends ProxyInputStream {
/**
- * Abstracts observer callback for {@code ObservableInputStream}s.
+ * Abstracts observer callback for {@link ObservableInputStream}s.
*/
public static abstract class Observer {
diff --git a/src/main/java/org/apache/commons/io/input/QueueInputStream.java b/src/main/java/org/apache/commons/io/input/QueueInputStream.java
index 4e0f8e3b..48cdadda 100644
--- a/src/main/java/org/apache/commons/io/input/QueueInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/QueueInputStream.java
@@ -18,6 +18,7 @@ package org.apache.commons.io.input;
import static org.apache.commons.io.IOUtils.EOF;
+import java.io.IOException;
import java.io.InputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
@@ -47,8 +48,8 @@ import org.apache.commons.io.output.QueueOutputStream;
* thread. Instances can be used longer after initial threads exited.
* </p>
* <p>
- * Closing a {@code QueueInputStream} has no effect. The methods in this class can be called after the stream has been
- * closed without generating an {@code IOException}.
+ * Closing a {@link QueueInputStream} has no effect. The methods in this class can be called after the stream has been
+ * closed without generating an {@link IOException}.
* </p>
*
* @see QueueOutputStream
diff --git a/src/main/java/org/apache/commons/io/input/Tailer.java b/src/main/java/org/apache/commons/io/input/Tailer.java
index 6771c158..6e067c80 100644
--- a/src/main/java/org/apache/commons/io/input/Tailer.java
+++ b/src/main/java/org/apache/commons/io/input/Tailer.java
@@ -377,10 +377,10 @@ public class Tailer implements Runnable, AutoCloseable {
RandomAccessResourceBridge getRandomAccess(final String mode) throws FileNotFoundException;
/**
- * Tests if this tailable is newer than the specified {@code FileTime}.
+ * Tests if this tailable is newer than the specified {@link FileTime}.
*
* @param fileTime the file time reference.
- * @return true if the {@code File} exists and has been modified after the given {@code FileTime}.
+ * @return true if the {@link File} exists and has been modified after the given {@link FileTime}.
* @throws IOException if an I/O error occurs.
*/
boolean isNewer(final FileTime fileTime) throws IOException;
diff --git a/src/main/java/org/apache/commons/io/input/UncheckedFilterInputStream.java b/src/main/java/org/apache/commons/io/input/UncheckedFilterInputStream.java
index 9f0fccfa..9571d723 100644
--- a/src/main/java/org/apache/commons/io/input/UncheckedFilterInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/UncheckedFilterInputStream.java
@@ -37,7 +37,7 @@ import org.apache.commons.io.UncheckedIO;
public class UncheckedFilterInputStream extends FilterInputStream {
/**
- * Creates a {@code UncheckedFilterInputStream}.
+ * Creates a {@link UncheckedFilterInputStream}.
*
* @param inputStream the underlying input stream, or {@code null} if this instance is to be created without an
* underlying stream.
@@ -48,7 +48,7 @@ public class UncheckedFilterInputStream extends FilterInputStream {
}
/**
- * Creates a {@code UncheckedFilterInputStream}.
+ * Creates a {@link UncheckedFilterInputStream}.
*
* @param inputStream the underlying input stream, or {@code null} if this instance is to be created without an
* underlying stream.
diff --git a/src/main/java/org/apache/commons/io/input/buffer/package-info.java b/src/main/java/org/apache/commons/io/input/buffer/package-info.java
index 9e1a0e97..146e5b18 100644
--- a/src/main/java/org/apache/commons/io/input/buffer/package-info.java
+++ b/src/main/java/org/apache/commons/io/input/buffer/package-info.java
@@ -16,6 +16,8 @@
*/
/**
- * This package provides implementations of buffered input classes, such as {@code CircularBufferInputStream} and {@code PeekableInputStream}.
+ * This package provides implementations of buffered input classes, such as
+ * {@link org.apache.commons.io.input.buffer.CircularBufferInputStream} and
+ * {@link org.apache.commons.io.input.buffer.PeekableInputStream}.
*/
package org.apache.commons.io.input.buffer;
diff --git a/src/main/java/org/apache/commons/io/input/package-info.java b/src/main/java/org/apache/commons/io/input/package-info.java
index e51ea553..25cfd546 100644
--- a/src/main/java/org/apache/commons/io/input/package-info.java
+++ b/src/main/java/org/apache/commons/io/input/package-info.java
@@ -16,6 +16,6 @@
*/
/**
- * This package provides implementations of input classes, such as {@code InputStream} and {@code Reader}.
+ * This package provides implementations of input classes, such as {@link java.io.InputStream} and {@link java.io.Reader}.
*/
package org.apache.commons.io.input;
diff --git a/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java b/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
index 6842ca31..9480793d 100644
--- a/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
@@ -38,9 +38,9 @@ import org.apache.commons.io.input.ClosedInputStream;
* <p>
* The data can be retrieved using {@code toByteArray()} and
* {@code toString()}.
- * Closing an {@code AbstractByteArrayOutputStream} has no effect. The methods in
+ * Closing an {@link AbstractByteArrayOutputStream} has no effect. The methods in
* this class can be called after the stream has been closed without
- * generating an {@code IOException}.
+ * generating an {@link IOException}.
* </p>
* <p>
* This is the base for an alternative implementation of the
@@ -95,9 +95,9 @@ public abstract class AbstractByteArrayOutputStream extends OutputStream {
private boolean reuseBuffers = true;
/**
- * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
+ * Closing a {@link ByteArrayOutputStream} has no effect. The methods in
* this class can be called after the stream has been closed without
- * generating an {@code IOException}.
+ * generating an {@link IOException}.
*
* @throws IOException never (this method should not declare this exception
* but it has to now due to backwards compatibility)
diff --git a/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java b/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
index 78662eb9..d8f9edd3 100644
--- a/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
@@ -16,6 +16,7 @@
*/
package org.apache.commons.io.output;
+import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -27,7 +28,7 @@ import java.io.OutputStream;
public class ByteArrayOutputStream extends AbstractByteArrayOutputStream {
/**
- * Fetches entire contents of an {@code InputStream} and represent
+ * Fetches entire contents of an {@link InputStream} and represent
* same data as result InputStream.
* <p>
* This method is useful where,
@@ -41,7 +42,7 @@ public class ByteArrayOutputStream extends AbstractByteArrayOutputStream {
* It can be used in favor of {@link #toByteArray()}, since it
* avoids unnecessary allocation and copy of byte[].<br>
* This method buffers the input internally, so there is no need to use a
- * {@code BufferedInputStream}.
+ * {@link BufferedInputStream}.
*
* @param input Stream to be fully buffered.
* @return A fully buffered stream.
@@ -54,7 +55,7 @@ public class ByteArrayOutputStream extends AbstractByteArrayOutputStream {
}
/**
- * Fetches entire contents of an {@code InputStream} and represent
+ * Fetches entire contents of an {@link InputStream} and represent
* same data as result InputStream.
* <p>
* This method is useful where,
@@ -68,7 +69,7 @@ public class ByteArrayOutputStream extends AbstractByteArrayOutputStream {
* It can be used in favor of {@link #toByteArray()}, since it
* avoids unnecessary allocation and copy of byte[].<br>
* This method buffers the input internally, so there is no need to use a
- * {@code BufferedInputStream}.
+ * {@link BufferedInputStream}.
*
* @param input Stream to be fully buffered.
* @param size the initial buffer size
diff --git a/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java b/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
index 9d935eee..aacde96e 100644
--- a/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
+++ b/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java
@@ -17,6 +17,7 @@
package org.apache.commons.io.output;
import java.io.File;
+import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
@@ -32,8 +33,8 @@ import org.apache.commons.io.IOUtils;
/**
* Writer of files that allows the encoding to be set.
* <p>
- * This class provides a simple alternative to {@code FileWriter} that allows an encoding to be set. Unfortunately, it
- * cannot subclass {@code FileWriter}.
+ * This class provides a simple alternative to {@link FileWriter} that allows an encoding to be set. Unfortunately, it
+ * cannot subclass {@link FileWriter}.
* </p>
* <p>
* By default, the file will be overwritten, but this may be changed to append.
diff --git a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java
index e61d90c1..cfb00d4f 100644
--- a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java
+++ b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java
@@ -18,6 +18,7 @@ package org.apache.commons.io.output;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
@@ -30,7 +31,7 @@ import org.apache.commons.io.FileUtils;
* FileWriter that will create and honor lock files to allow simple
* cross thread file lock handling.
* <p>
- * This class provides a simple alternative to {@code FileWriter}
+ * This class provides a simple alternative to {@link FileWriter}
* that will use a lock file to prevent duplicate writes.
* </p>
* <p>
diff --git a/src/main/java/org/apache/commons/io/output/NullWriter.java b/src/main/java/org/apache/commons/io/output/NullWriter.java
index 602763b9..1fb9e314 100644
--- a/src/main/java/org/apache/commons/io/output/NullWriter.java
+++ b/src/main/java/org/apache/commons/io/output/NullWriter.java
@@ -21,7 +21,7 @@ import java.io.Writer;
/**
* Never writes data. Calls never go beyond this class.
* <p>
- * This {@code Writer} has no destination (file/socket etc.) and all characters written to it are ignored and lost.
+ * This {@link Writer} has no destination (file/socket etc.) and all characters written to it are ignored and lost.
* </p>
*/
public class NullWriter extends Writer {
diff --git a/src/main/java/org/apache/commons/io/output/QueueOutputStream.java b/src/main/java/org/apache/commons/io/output/QueueOutputStream.java
index b9fe51a7..0eb648b2 100644
--- a/src/main/java/org/apache/commons/io/output/QueueOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/QueueOutputStream.java
@@ -16,6 +16,7 @@
*/
package org.apache.commons.io.output;
+import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.io.PipedInputStream;
@@ -45,8 +46,8 @@ import org.apache.commons.io.input.QueueInputStream;
* single thread or multiple threads. Also, unlike JDK classes, no special meaning is attached to initial or current
* thread. Instances can be used longer after initial threads exited.
* <p>
- * Closing a {@code QueueOutputStream} has no effect. The methods in this class can be called after the stream has been
- * closed without generating an {@code IOException}.
+ * Closing a {@link QueueOutputStream} has no effect. The methods in this class can be called after the stream has been
+ * closed without generating an {@link IOException}.
* </p>
*
* @see QueueInputStream
diff --git a/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java b/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java
index 3992d9cd..9153f0bc 100644
--- a/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java
@@ -27,7 +27,7 @@ import org.apache.commons.io.function.IOFunction;
* can be used, for example, to throw an exception if a maximum has been reached, or to switch the underlying stream
* type when the threshold is exceeded.
* <p>
- * This class overrides all {@code OutputStream} methods. However, these overrides ultimately call the corresponding
+ * This class overrides all {@link OutputStream} methods. However, these overrides ultimately call the corresponding
* methods in the underlying output stream implementation.
* </p>
* <p>
@@ -142,7 +142,7 @@ public class ThresholdingOutputStream extends OutputStream {
}
/**
- * Returns the underlying output stream, to which the corresponding {@code OutputStream} methods in this class will
+ * Returns the underlying output stream, to which the corresponding {@link OutputStream} methods in this class will
* ultimately delegate.
*
* @return The underlying output stream.
diff --git a/src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java b/src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java
index 6421f68f..f48d0435 100644
--- a/src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java
@@ -16,6 +16,7 @@
*/
package org.apache.commons.io.output;
+import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -31,7 +32,7 @@ import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream;
public final class UnsynchronizedByteArrayOutputStream extends AbstractByteArrayOutputStream {
/**
- * Fetches entire contents of an {@code InputStream} and represent same data as result InputStream.
+ * Fetches entire contents of an {@link InputStream} and represent same data as result InputStream.
* <p>
* This method is useful where,
* </p>
@@ -41,7 +42,7 @@ public final class UnsynchronizedByteArrayOutputStream extends AbstractByteArray
* <li>It has network timeout associated.</li>
* </ul>
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].<br>
- * This method buffers the input internally, so there is no need to use a {@code BufferedInputStream}.
+ * This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
*
* @param input Stream to be fully buffered.
* @return A fully buffered stream.
@@ -52,7 +53,7 @@ public final class UnsynchronizedByteArrayOutputStream extends AbstractByteArray
}
/**
- * Fetches entire contents of an {@code InputStream} and represent same data as result InputStream.
+ * Fetches entire contents of an {@link InputStream} and represent same data as result InputStream.
* <p>
* This method is useful where,
* </p>
@@ -62,7 +63,7 @@ public final class UnsynchronizedByteArrayOutputStream extends AbstractByteArray
* <li>It has network timeout associated.</li>
* </ul>
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].<br>
- * This method buffers the input internally, so there is no need to use a {@code BufferedInputStream}.
+ * This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
*
* @param input Stream to be fully buffered.
* @param size the initial buffer size
diff --git a/src/main/java/org/apache/commons/io/output/package-info.java b/src/main/java/org/apache/commons/io/output/package-info.java
index d98fa7e8..04acccee 100644
--- a/src/main/java/org/apache/commons/io/output/package-info.java
+++ b/src/main/java/org/apache/commons/io/output/package-info.java
@@ -16,6 +16,7 @@
*/
/**
- * This package provides implementations of output classes, such as {@code OutputStream} and {@code Writer}.
+ * This package provides implementations of output classes, such as {@link java.io.OutputStream} and
+ * {@link java.io.Writer}.
*/
package org.apache.commons.io.output;
diff --git a/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java b/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java
index f4fea5e1..a27d72cd 100644
--- a/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java
+++ b/src/main/java/org/apache/commons/io/serialization/ValidatingObjectInputStream.java
@@ -28,7 +28,7 @@ import java.util.List;
import java.util.regex.Pattern;
/**
- * An {@code ObjectInputStream} that's restricted to deserialize
+ * An {@link ObjectInputStream} that's restricted to deserialize
* a limited set of classes.
*
* <p>
@@ -113,7 +113,7 @@ public class ValidatingObjectInputStream extends ObjectInputStream {
}
/**
- * Called to throw {@code InvalidClassException} if an invalid
+ * Called to throw {@link InvalidClassException} if an invalid
* class name is found during deserialization. Can be overridden, for example
* to log those class names.
*