diff --git a/src/main/java/org/apache/commons/io/DirectoryWalker.java b/src/main/java/org/apache/commons/io/DirectoryWalker.java index 62298a50c13..1a0fdc2ba21 100644 --- a/src/main/java/org/apache/commons/io/DirectoryWalker.java +++ b/src/main/java/org/apache/commons/io/DirectoryWalker.java @@ -215,7 +215,7 @@ *
- * This shows an example of how internal cancellation processing could be implemented. Note the decision logic + * This shows an example of how internal cancellation processing could be implemented. Note the decision logic * and throwing a {@link CancelException} could be implemented in any of the lifecycle methods. *
* diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java index d9ce9a3e74c..4e61ed7a210 100644 --- a/src/main/java/org/apache/commons/io/FileUtils.java +++ b/src/main/java/org/apache/commons/io/FileUtils.java @@ -586,14 +586,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final bo * {@link File#setLastModified(long)}. However it is not guaranteed that those operations will succeed. If the * modification operation fails, the method throws IOException. * - * Example: Copy directories only + * Example: Copy directories only * ** // only copy the directory structure * FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY); ** - * Example: Copy directories and txt files + * Example: Copy directories and txt files * *
* // Create a filter for ".txt" files @@ -637,14 +637,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi * not guaranteed that the operation will succeed. If the modification operation fails it falls back to * {@link File#setLastModified(long)}. If that fails, the method throws IOException. * - * Example: Copy directories only + * Example: Copy directories only * *** // only copy the directory structure * FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false); ** - * Example: Copy directories and txt files + * Example: Copy directories and txt files * ** // Create a filter for ".txt" files @@ -688,14 +688,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi * not guaranteed that the operation will succeed. If the modification operation fails it falls back to * {@link File#setLastModified(long)}. If that fails, the method throws IOException. * - * Example: Copy directories only + * Example: Copy directories only * *** // only copy the directory structure * FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false); ** - * Example: Copy directories and txt files + * Example: Copy directories and txt files * ** // Create a filter for ".txt" files diff --git a/src/main/java/org/apache/commons/io/FilenameUtils.java b/src/main/java/org/apache/commons/io/FilenameUtils.java index 508f2da90fb..9fdbc739244 100644 --- a/src/main/java/org/apache/commons/io/FilenameUtils.java +++ b/src/main/java/org/apache/commons/io/FilenameUtils.java @@ -37,7 +37,7 @@ * This class aims to help avoid those problems. * **- * NOTE: You may be able to avoid using this class entirely simply by + * NOTE: You may be able to avoid using this class entirely simply by * using JDK {@link File File} objects and the two argument constructor * {@link File#File(java.io.File, String) File(File,String)}. *
@@ -634,7 +634,7 @@ public static String getBaseName(final String fileName) { * exception of a possible {@link IllegalArgumentException} on Windows (see below). * *- * Note: This method used to have a hidden problem for names like "foo.exe:bar.txt". + * Note: This method used to have a hidden problem for names like "foo.exe:bar.txt". * In this case, the name wouldn't be the name of a file, but the identifier of an * alternate data stream (bar.txt) on the file foo.exe. The method used to return * ".txt" here, which would be misleading. Commons IO 2.7 and later throw @@ -644,7 +644,7 @@ public static String getBaseName(final String fileName) { * @param fileName the file name to retrieve the extension of. * @return the extension of the file or an empty string if none exists or {@code null} * if the file name is {@code null}. - * @throws IllegalArgumentException Windows only: the file name parameter is, in fact, + * @throws IllegalArgumentException Windows only: the file name parameter is, in fact, * the identifier of an Alternate Data Stream, for example "foo.exe:bar.txt". */ public static String getExtension(final String fileName) throws IllegalArgumentException { @@ -972,7 +972,7 @@ public static int getPrefixLength(final String fileName) { * The output will be the same irrespective of the machine that the code is running on, with the * exception of a possible {@link IllegalArgumentException} on Windows (see below). *
- * Note: This method used to have a hidden problem for names like "foo.exe:bar.txt". + * Note: This method used to have a hidden problem for names like "foo.exe:bar.txt". * In this case, the name wouldn't be the name of a file, but the identifier of an * alternate data stream (bar.txt) on the file foo.exe. The method used to return * ".txt" here, which would be misleading. Commons IO 2.7, and later versions, are throwing @@ -981,7 +981,7 @@ public static int getPrefixLength(final String fileName) { * @param fileName * the file name to find the last extension separator in, null returns -1 * @return the index of the last extension separator character, or -1 if there is no such character - * @throws IllegalArgumentException Windows only: the file name parameter is, in fact, + * @throws IllegalArgumentException Windows only: the file name parameter is, in fact, * the identifier of an Alternate Data Stream, for example "foo.exe:bar.txt". */ public static int indexOfExtension(final String fileName) throws IllegalArgumentException { diff --git a/src/main/java/org/apache/commons/io/IOUtils.java b/src/main/java/org/apache/commons/io/IOUtils.java index 72bc4c4ca31..2c420d0707d 100644 --- a/src/main/java/org/apache/commons/io/IOUtils.java +++ b/src/main/java/org/apache/commons/io/IOUtils.java @@ -545,7 +545,7 @@ public static void closeQuietly(final Closeable closeable) { * } catch (Exception e) { * // error handling * } finally { - * IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception + * IOUtils.closeQuietly(closeable); // In case normal close was skipped due to Exception * } *@@ -2743,7 +2743,7 @@ public static byte[] toByteArray(final InputStream input, final int size) throws * Gets contents of an {@link InputStream} as a {@code byte[]}. * Use this method instead of {@link #toByteArray(InputStream)} * when {@link InputStream} size is known. - * NOTE: the method checks that the length can safely be cast to an int without truncation + * NOTE: the method checks that the length can safely be cast to an int without truncation * before using {@link IOUtils#toByteArray(InputStream, int)} to read into the byte array. * (Arrays can have no more than Integer.MAX_VALUE entries anyway) * diff --git a/src/main/java/org/apache/commons/io/StreamIterator.java b/src/main/java/org/apache/commons/io/StreamIterator.java index 23465657be3..1df839a73a8 100644 --- a/src/main/java/org/apache/commons/io/StreamIterator.java +++ b/src/main/java/org/apache/commons/io/StreamIterator.java @@ -37,7 +37,7 @@ public final class StreamIterator
implements Iterator , AutoCloseable { /** * Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of stream. * - * Warning + * Warning *
** In order to close the stream, the call site MUST either close the stream it allocated OR call this iterator until the end. diff --git a/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java b/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java index b8d50edfe91..ca0fcb39aa0 100644 --- a/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java +++ b/src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java @@ -21,7 +21,7 @@ import java.util.Comparator; /** - * Compares two files using the default {@link File#compareTo(File)} method. + * Compares two files using the default {@link File#compareTo(File)} method. *
* This comparator can be used to sort lists or arrays of files * by using the default file comparison. diff --git a/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java b/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java index be56c8becde..a0b11a69421 100644 --- a/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java +++ b/src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java @@ -24,7 +24,7 @@ import org.apache.commons.io.IOCase; /** - * Compare the file name extensions for order + * Compare the file name extensions for order * (see {@link FilenameUtils#getExtension(String)}). *
* This comparator can be used to sort lists or arrays of files diff --git a/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java b/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java index be7652897f8..26f1bc6e6e1 100644 --- a/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java +++ b/src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java @@ -23,7 +23,7 @@ import org.apache.commons.io.FileUtils; /** - * Compare the last modified date/time of two files for order + * Compare the last modified date/time of two files for order * (see {@link FileUtils#lastModifiedUnchecked(File)}). *
* This comparator can be used to sort lists or arrays of files diff --git a/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java b/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java index 4e2167bdf07..0001c7a3c76 100644 --- a/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java +++ b/src/main/java/org/apache/commons/io/comparator/NameFileComparator.java @@ -23,7 +23,7 @@ import org.apache.commons.io.IOCase; /** - * Compare the names of two files for order (see {@link File#getName()}). + * Compare the names of two files for order (see {@link File#getName()}). *
* This comparator can be used to sort lists or arrays of files * by their name either in a case-sensitive, case-insensitive or diff --git a/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java b/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java index 86432efb80b..3254cc3225c 100644 --- a/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java +++ b/src/main/java/org/apache/commons/io/comparator/PathFileComparator.java @@ -23,7 +23,7 @@ import org.apache.commons.io.IOCase; /** - * Compare the path of two files for order (see {@link File#getPath()}). + * Compare the path of two files for order (see {@link File#getPath()}). *
* This comparator can be used to sort lists or arrays of files * by their path either in a case-sensitive, case-insensitive or diff --git a/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java b/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java index 804563473b8..f7eac085783 100644 --- a/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java +++ b/src/main/java/org/apache/commons/io/comparator/SizeFileComparator.java @@ -23,7 +23,7 @@ import org.apache.commons.io.FileUtils; /** - * Compare the length/size of two files for order (see + * Compare the length/size of two files for order (see * {@link File#length()} and {@link FileUtils#sizeOfDirectory(File)}). *
* This comparator can be used to sort lists or arrays of files @@ -46,7 +46,7 @@ * ((AbstractFileComparator) SizeFileComparator.SIZE_REVERSE).sort(array); *
- * N.B. Directories are treated as zero size unless + * N.B. Directories are treated as zero size unless * {@code sumDirectoryContents} is {@code true}. *
*Deprecating Serialization
diff --git a/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java index c8508e18e81..8601cbaa660 100644 --- a/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java @@ -51,14 +51,14 @@ * AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new AgeFileFilter(cutoff)); * // * // Walk one directoryectory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); @@ -175,8 +175,8 @@ public AgeFileFilter(final long cutoffMillis, final boolean acceptOlder) { /** * Checks to see if the last modification of the file matches cutoff favorably. *- * If last modification time equals cutoff and newer files are required, file IS NOT selected. If last - * modification time equals cutoff and older files are required, file IS selected. + * If last modification time equals cutoff and newer files are required, file IS NOT selected. If last + * modification time equals cutoff and older files are required, file IS selected. *
* * @param file the File to check @@ -190,8 +190,8 @@ public boolean accept(final File file) { /** * Checks to see if the last modification of the file matches cutoff favorably. *- * If last modification time equals cutoff and newer files are required, file IS NOT selected. If last - * modification time equals cutoff and older files are required, file IS selected. + * If last modification time equals cutoff and newer files are required, file IS NOT selected. If last + * modification time equals cutoff and older files are required, file IS selected. *
* * @param file the File to check 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 7a2d8c2a78a..343fd99a18e 100644 --- a/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/CanWriteFileFilter.java @@ -47,7 +47,7 @@ * } *
- * N.B. For read-only files, use {@code CanReadFileFilter.READ_ONLY}. + * N.B. For read-only files, use {@code CanReadFileFilter.READ_ONLY}. *
*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 9bb2555d873..4a8fdcf3bce 100644 --- a/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/DirectoryFileFilter.java @@ -45,14 +45,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(DirectoryFileFilter.INSTANCE); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); 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 50c3c461f38..33b84343429 100644 --- a/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/EmptyFileFilter.java @@ -61,14 +61,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(EmptyFileFilter.EMPTY); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); 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 1924676811c..4277dce160f 100644 --- a/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/FileFileFilter.java @@ -44,14 +44,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(FileFileFilter.INSTANCE); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); 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 2cd9e8c73b2..963b9057bd7 100644 --- a/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java @@ -57,14 +57,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(HiddenFileFilter.HIDDEN); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java index 660fb28cd95..6956bc8d25d 100644 --- a/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/MagicNumberFileFilter.java @@ -72,14 +72,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(MagicNumberFileFilter("ustar", 257)); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java index 6356b9c4af8..2fa2cb539b6 100644 --- a/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/NameFileFilter.java @@ -49,14 +49,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new NameFileFilter("Test")); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java index fd463bbdafa..7c8d4c4a5e2 100644 --- a/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java @@ -49,14 +49,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new PrefixFileFilter("Test")); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java index 03b031f36e9..e941132150d 100644 --- a/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java @@ -53,14 +53,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$")); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java index e95a3bbd33f..f9b68974dc8 100644 --- a/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java @@ -46,14 +46,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new SizeFileFilter(1024 * 1024)); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); @@ -110,9 +110,9 @@ public SizeFileFilter(final long size, final boolean acceptLarger) { * Checks to see if the size of the file is favorable. *
* If size equals threshold and smaller files are required, - * file IS NOT selected. + * file IS NOT selected. * If size equals threshold and larger files are required, - * file IS selected. + * file IS selected. *
* * @param file the File to check @@ -130,8 +130,8 @@ private boolean accept(final long length) { /** * Checks to see if the size of the file is favorable. *- * If size equals threshold and smaller files are required, file IS NOT selected. If size equals threshold and larger files are required, file - * IS selected. + * If size equals threshold and smaller files are required, file IS NOT selected. If size equals threshold and larger files are required, + * file IS selected. *
* * @param file the File to check diff --git a/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java index dc9cc2bda08..8823c24a113 100644 --- a/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java @@ -50,14 +50,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new SuffixFileFilter(".java")); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); 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 4a8599f2ed3..a0867f0fa8d 100644 --- a/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java @@ -44,14 +44,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(SymbolicLinkFileFilter.INSTANCE); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java index c1c456ce92b..6ee4db9216e 100644 --- a/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java @@ -64,14 +64,14 @@ * WildcardFileFilter.builder().setWildcards("*test*.java~*~").get()); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java b/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java index c6ffdf6d705..a9350b13f47 100644 --- a/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java @@ -61,14 +61,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new WildcardFilter("*test*.java~*~")); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/filefilter/package-info.java b/src/main/java/org/apache/commons/io/filefilter/package-info.java index baf62c7442f..8114b4de0de 100644 --- a/src/main/java/org/apache/commons/io/filefilter/package-info.java +++ b/src/main/java/org/apache/commons/io/filefilter/package-info.java @@ -148,7 +148,7 @@ * } * *You can combine Java file tree walking by using java.nio.file.Files.walk()
APIs with filters:
You can combine Java file tree walking by using java.nio.file.Files.walk()
APIs with filters:
* final Path dir = Paths.get(""); * // We are interested in files older than one day @@ -156,14 +156,14 @@ * final AccumulatorPathVisitor visitor = AccumulatorPathVisitor.withLongCounters(new AgeFileFilter(cutoff)); * // * // Walk one directory - * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); + * Files.walkFileTree(dir, Collections.emptySet(), 1, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getFileList()); * // * visitor.getPathCounters().reset(); * // * // Walk directory tree - * Files.walkFileTree(dir, visitor); + * Files.walkFileTree(dir, visitor); * System.out.println(visitor.getPathCounters()); * System.out.println(visitor.getDirList()); * System.out.println(visitor.getFileList()); diff --git a/src/main/java/org/apache/commons/io/input/ByteBufferCleaner.java b/src/main/java/org/apache/commons/io/input/ByteBufferCleaner.java index 055beb2ee27..6126b2a53a5 100644 --- a/src/main/java/org/apache/commons/io/input/ByteBufferCleaner.java +++ b/src/main/java/org/apache/commons/io/input/ByteBufferCleaner.java @@ -25,7 +25,7 @@ * garbage collection. However, this should not be relied upon since it may not occur in a timely fashion - * especially since off heap ByeBuffers don't put pressure on the garbage collector. *- * Warning: Do not attempt to use a direct {@link ByteBuffer} that has been cleaned or bad things will happen. + * Warning: Do not attempt to use a direct {@link ByteBuffer} that has been cleaned or bad things will happen. * Don't use this class unless you can ensure that the cleaned buffer will not be accessed anymore. *
*diff --git a/src/main/java/org/apache/commons/io/input/TailerListener.java b/src/main/java/org/apache/commons/io/input/TailerListener.java index ae86685409d..4c4c1ec221e 100644 --- a/src/main/java/org/apache/commons/io/input/TailerListener.java +++ b/src/main/java/org/apache/commons/io/input/TailerListener.java @@ -26,7 +26,7 @@ public interface TailerListener { /** * This method is called if the tailed file is not found. *
- * Note: this is called from the tailer thread. + * Note: this is called from the tailer thread. *
*/ void fileNotFound(); @@ -37,7 +37,7 @@ public interface TailerListener { * This method is called before the file is reopened, and fileNotFound may * be called if the new file has not yet been created. *- * Note: this is called from the tailer thread. + * Note: this is called from the tailer thread. *
*/ void fileRotated(); @@ -45,7 +45,7 @@ public interface TailerListener { /** * Handles an Exception. *- * Note: this is called from the tailer thread. + * Note: this is called from the tailer thread. *
* @param ex the exception. */ @@ -54,7 +54,7 @@ public interface TailerListener { /** * Handles a line from a Tailer. *- * Note: this is called from the tailer thread. + * Note: this is called from the tailer thread. *
* @param line the line. */ diff --git a/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java b/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java index 6b8760cbe28..51b7d9c37c1 100644 --- a/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java +++ b/src/main/java/org/apache/commons/io/input/TailerListenerAdapter.java @@ -26,7 +26,7 @@ public class TailerListenerAdapter implements TailerListener { /** * Called each time the Tailer reaches the end of the file. * - * Note: this is called from the tailer thread. + * Note: this is called from the tailer thread. * * Note: a future version of commons-io will pull this method up to the TailerListener interface, * for now clients must subclass this class to use this feature. 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 ee1a2dcb0e3..6032f04bbda 100644 --- a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java +++ b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java @@ -37,8 +37,8 @@ * This class provides a simple alternative to {@link FileWriter} that will use a lock file to prevent duplicate writes. * *- * Note: The lock file is deleted when {@link #close()} is called - or if the main file cannot be opened initially. In the (unlikely) event that the lock - * file cannot be deleted, an exception is thrown. + * Note: The lock file is deleted when {@link #close()} is called - or if the main file cannot be opened initially. In the (unlikely) event + * that the lock file cannot be deleted, an exception is thrown. *
** By default, the file will be overwritten, but this may be changed to append. The lock directory may be specified, but defaults to the system property diff --git a/src/main/java/org/apache/commons/io/output/NullAppendable.java b/src/main/java/org/apache/commons/io/output/NullAppendable.java index 14ed4fab2cf..40889f4c936 100644 --- a/src/main/java/org/apache/commons/io/output/NullAppendable.java +++ b/src/main/java/org/apache/commons/io/output/NullAppendable.java @@ -20,7 +20,7 @@ import java.io.IOException; /** - * Appends all data to the famous /dev/null. + * Appends all data to the famous /dev/null. *
* This Appendable has no destination (file/socket etc.) and all characters written to it are ignored and lost. *
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 31e14aab5f5..cd0b231fab3 100644 --- a/src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/UnsynchronizedByteArrayOutputStream.java @@ -27,7 +27,7 @@ import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; /** - * Implements a version of {@link AbstractByteArrayOutputStream} without any concurrent thread safety. + * Implements a version of {@link AbstractByteArrayOutputStream} without any concurrent thread safety. ** To build an instance, use {@link Builder}. *
diff --git a/src/main/java/org/apache/commons/io/package-info.java b/src/main/java/org/apache/commons/io/package-info.java index 6633c106fc0..25cfe2441aa 100644 --- a/src/main/java/org/apache/commons/io/package-info.java +++ b/src/main/java/org/apache/commons/io/package-info.java @@ -18,20 +18,21 @@ /** * Provides classes for working with streams, readers, writers and files. The most commonly used classes are described here: *- * IOUtils is the most frequently used class. It provides operations to read, write, copy and close streams. + * IOUtils is the most frequently used class. It provides operations to read, write, copy and close streams. *
*- * FileUtils provides operations based around the JDK File class. These include reading, writing, copying, comparing and deleting. + * FileUtils provides operations based around the JDK File class. These include reading, writing, copying, comparing and deleting. *
*- * FilenameUtils provides utilities based on filenames. This utility class manipulates file names without using File objects. It aims to simplify the - * transition between Windows and Unix. Before using this class however, you should consider whether you should be using File objects. + * FilenameUtils provides utilities based on filenames. This utility class manipulates file names without using File objects. It aims to + * simplify the transition between Windows and Unix. Before using this class however, you should consider whether you should be using File objects. *
*- * FileSystemUtils allows access to the filing system in ways the JDK does not support. At present this allows you to get the free space on a drive. + * FileSystemUtils allows access to the filing system in ways the JDK does not support. At present this allows you to get the free space on a + * drive. *
*- * EndianUtils swaps data between Big-Endian and Little-Endian formats. + * EndianUtils swaps data between Big-Endian and Little-Endian formats. *
*/ package org.apache.commons.io;