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
The following commit(s) were added to refs/heads/master by this push: new 618c806db Javadoc 618c806db is described below commit 618c806dbf8bd2193734f864077e221bb7094cac Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu May 23 09:21:12 2024 -0400 Javadoc --- .../commons/io/build/AbstractOriginSupplier.java | 24 +++++++++++----------- .../commons/io/build/AbstractStreamBuilder.java | 2 +- .../commons/io/filefilter/WildcardFileFilter.java | 6 +++--- .../apache/commons/io/input/BOMInputStream.java | 4 ++-- .../commons/io/input/CharSequenceInputStream.java | 2 +- .../commons/io/input/MessageDigestInputStream.java | 4 ++-- .../apache/commons/io/input/QueueInputStream.java | 2 +- .../io/input/RandomAccessFileInputStream.java | 4 ++-- .../commons/io/input/ReadAheadInputStream.java | 2 +- .../apache/commons/io/input/ReaderInputStream.java | 2 +- .../java/org/apache/commons/io/input/Tailer.java | 12 +++++------ .../io/output/DeferredFileOutputStream.java | 14 ++++++------- .../commons/io/output/FileWriterWithEncoding.java | 4 ++-- .../commons/io/output/LockableFileWriter.java | 6 +++--- .../commons/io/output/WriterOutputStream.java | 4 ++-- 15 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/main/java/org/apache/commons/io/build/AbstractOriginSupplier.java b/src/main/java/org/apache/commons/io/build/AbstractOriginSupplier.java index bd8237132..bd62682a4 100644 --- a/src/main/java/org/apache/commons/io/build/AbstractOriginSupplier.java +++ b/src/main/java/org/apache/commons/io/build/AbstractOriginSupplier.java @@ -196,7 +196,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setByteArray(final byte[] origin) { return setOrigin(newByteArrayOrigin(origin)); @@ -206,7 +206,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. * @since 2.13.0 */ public B setCharSequence(final CharSequence origin) { @@ -217,7 +217,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setFile(final File origin) { return setOrigin(newFileOrigin(origin)); @@ -227,7 +227,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setFile(final String origin) { return setOrigin(newFileOrigin(origin)); @@ -237,7 +237,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setInputStream(final InputStream origin) { return setOrigin(newInputStreamOrigin(origin)); @@ -247,7 +247,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ protected B setOrigin(final AbstractOrigin<?, ?> origin) { this.origin = origin; @@ -258,7 +258,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setOutputStream(final OutputStream origin) { return setOrigin(newOutputStreamOrigin(origin)); @@ -268,7 +268,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setPath(final Path origin) { return setOrigin(newPathOrigin(origin)); @@ -278,7 +278,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setPath(final String origin) { return setOrigin(newPathOrigin(origin)); @@ -288,7 +288,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setReader(final Reader origin) { return setOrigin(newReaderOrigin(origin)); @@ -298,7 +298,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setURI(final URI origin) { return setOrigin(newURIOrigin(origin)); @@ -308,7 +308,7 @@ public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier * Sets a new origin. * * @param origin the new origin. - * @return this + * @return {@code this} instance. */ public B setWriter(final Writer origin) { return setOrigin(newWriterOrigin(origin)); diff --git a/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java b/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java index c8c9fbdea..60d2b04d7 100644 --- a/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java +++ b/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java @@ -255,7 +255,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * Sets the buffer size checker function. Throws a {@link IllegalArgumentException} by default. * * @param bufferSizeChecker the buffer size checker function. null resets to the default behavior. - * @return this + * @return {@code this} instance. * @since 2.14.0 */ public B setBufferSizeChecker(final IntUnaryOperator bufferSizeChecker) { 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 f5bad2e34..be687bccc 100644 --- a/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/WildcardFileFilter.java @@ -107,7 +107,7 @@ public class WildcardFileFilter extends AbstractFileFilter implements Serializab * Sets how to handle case sensitivity, null means case-sensitive. * * @param ioCase how to handle case sensitivity, null means case-sensitive. - * @return this + * @return {@code this} instance. */ public Builder setIoCase(final IOCase ioCase) { this.ioCase = IOCase.value(ioCase, IOCase.SENSITIVE); @@ -118,7 +118,7 @@ public class WildcardFileFilter extends AbstractFileFilter implements Serializab * Sets the list of wildcards to match, not null. * * @param wildcards the list of wildcards to match, not null. - * @return this + * @return {@code this} instance. */ public Builder setWildcards(final List<String> wildcards) { setWildcards(requireWildcards(wildcards).toArray(EMPTY_STRING_ARRAY)); @@ -129,7 +129,7 @@ public class WildcardFileFilter extends AbstractFileFilter implements Serializab * Sets the wildcards to match, not null. * * @param wildcards the wildcards to match, not null. - * @return this + * @return {@code this} instance. */ public Builder setWildcards(final String... wildcards) { this.wildcards = requireWildcards(wildcards); diff --git a/src/main/java/org/apache/commons/io/input/BOMInputStream.java b/src/main/java/org/apache/commons/io/input/BOMInputStream.java index 130c7a4a1..bf1e43226 100644 --- a/src/main/java/org/apache/commons/io/input/BOMInputStream.java +++ b/src/main/java/org/apache/commons/io/input/BOMInputStream.java @@ -178,7 +178,7 @@ public class BOMInputStream extends ProxyInputStream { * </p> * * @param byteOrderMarks the ByteOrderMarks to detect and optionally exclude. - * @return this + * @return {@code this} instance. */ public Builder setByteOrderMarks(final ByteOrderMark... byteOrderMarks) { this.byteOrderMarks = byteOrderMarks != null ? byteOrderMarks.clone() : DEFAULT; @@ -192,7 +192,7 @@ public class BOMInputStream extends ProxyInputStream { * </p> * * @param include true to include the UTF-8 BOM or false to exclude it. return this; - * @return this + * @return {@code this} instance. */ public Builder setInclude(final boolean include) { this.include = include; diff --git a/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java b/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java index 2f25d1465..c36d0d616 100644 --- a/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java +++ b/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java @@ -122,7 +122,7 @@ public class CharSequenceInputStream extends InputStream { * Sets the charset encoder. Assumes that the caller has configured the encoder. * * @param newEncoder the charset encoder. - * @return this + * @return {@code this} instance. * @since 2.13.0 */ public Builder setCharsetEncoder(final CharsetEncoder newEncoder) { diff --git a/src/main/java/org/apache/commons/io/input/MessageDigestInputStream.java b/src/main/java/org/apache/commons/io/input/MessageDigestInputStream.java index d789dc411..01b03996f 100644 --- a/src/main/java/org/apache/commons/io/input/MessageDigestInputStream.java +++ b/src/main/java/org/apache/commons/io/input/MessageDigestInputStream.java @@ -110,7 +110,7 @@ public final class MessageDigestInputStream extends ObservableInputStream { * </p> * * @param messageDigest the message digest. - * @return this + * @return {@code this} instance. */ public Builder setMessageDigest(final MessageDigest messageDigest) { this.messageDigest = messageDigest; @@ -126,7 +126,7 @@ public final class MessageDigestInputStream extends ObservableInputStream { * @param algorithm the name of the algorithm. See the MessageDigest section in the * <a href= "https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest"> Java Cryptography * Architecture Standard Algorithm Name Documentation</a> for information about standard algorithm names. - * @return this + * @return {@code this} instance. * @throws NoSuchAlgorithmException if no Provider supports a MessageDigestSpi implementation for the specified algorithm. */ public Builder setMessageDigest(final String algorithm) throws NoSuchAlgorithmException { 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 5c816552c..5daf11b7c 100644 --- a/src/main/java/org/apache/commons/io/input/QueueInputStream.java +++ b/src/main/java/org/apache/commons/io/input/QueueInputStream.java @@ -105,7 +105,7 @@ public class QueueInputStream extends InputStream { * Sets backing queue for the stream. * * @param blockingQueue backing queue for the stream. - * @return this + * @return {@code this} instance. */ public Builder setBlockingQueue(final BlockingQueue<Integer> blockingQueue) { this.blockingQueue = blockingQueue != null ? blockingQueue : new LinkedBlockingQueue<>(); diff --git a/src/main/java/org/apache/commons/io/input/RandomAccessFileInputStream.java b/src/main/java/org/apache/commons/io/input/RandomAccessFileInputStream.java index 4a80ff58f..efe31949c 100644 --- a/src/main/java/org/apache/commons/io/input/RandomAccessFileInputStream.java +++ b/src/main/java/org/apache/commons/io/input/RandomAccessFileInputStream.java @@ -98,7 +98,7 @@ public class RandomAccessFileInputStream extends InputStream { * Sets whether to close the underlying file when this stream is closed. * * @param closeOnClose Whether to close the underlying file when this stream is closed. - * @return this + * @return {@code this} instance. */ public Builder setCloseOnClose(final boolean closeOnClose) { this.closeOnClose = closeOnClose; @@ -109,7 +109,7 @@ public class RandomAccessFileInputStream extends InputStream { * Sets the RandomAccessFile to stream. * * @param randomAccessFile the RandomAccessFile to stream. - * @return this + * @return {@code this} instance. */ public Builder setRandomAccessFile(final RandomAccessFile randomAccessFile) { this.randomAccessFile = randomAccessFile; diff --git a/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java b/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java index d68c7205c..3a9fe366e 100644 --- a/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java +++ b/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java @@ -103,7 +103,7 @@ public class ReadAheadInputStream extends FilterInputStream { * Sets the executor service for the read-ahead thread. * * @param executorService the executor service for the read-ahead thread. - * @return this + * @return {@code this} instance. */ public Builder setExecutorService(final ExecutorService executorService) { this.executorService = executorService; diff --git a/src/main/java/org/apache/commons/io/input/ReaderInputStream.java b/src/main/java/org/apache/commons/io/input/ReaderInputStream.java index a9ea2351c..c80fc5631 100644 --- a/src/main/java/org/apache/commons/io/input/ReaderInputStream.java +++ b/src/main/java/org/apache/commons/io/input/ReaderInputStream.java @@ -150,7 +150,7 @@ public class ReaderInputStream extends InputStream { * Sets the charset encoder. Assumes that the caller has configured the encoder. * * @param newEncoder the charset encoder, null resets to a default encoder. - * @return this + * @return {@code this} instance. */ public Builder setCharsetEncoder(final CharsetEncoder newEncoder) { charsetEncoder = CharsetEncoders.toCharsetEncoder(newEncoder, () -> newEncoder(getCharsetDefault())); 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 0c7d8cc2f..051f15b88 100644 --- a/src/main/java/org/apache/commons/io/input/Tailer.java +++ b/src/main/java/org/apache/commons/io/input/Tailer.java @@ -219,7 +219,7 @@ public class Tailer implements Runnable, AutoCloseable { * Sets the delay duration. null resets to the default delay of one second. * * @param delayDuration the delay between checks of the file for new content. - * @return this + * @return {@code this} instance. */ public Builder setDelayDuration(final Duration delayDuration) { this.delayDuration = delayDuration != null ? delayDuration : DEFAULT_DELAY_DURATION; @@ -230,7 +230,7 @@ public class Tailer implements Runnable, AutoCloseable { * Sets the executor service to use when startThread is true. * * @param executorService the executor service to use when startThread is true. - * @return this + * @return {@code this} instance. */ public Builder setExecutorService(final ExecutorService executorService) { this.executorService = Objects.requireNonNull(executorService, "executorService"); @@ -252,7 +252,7 @@ public class Tailer implements Runnable, AutoCloseable { * Sets the re-open behavior. * * @param reOpen whether to close/reopen the file between chunks - * @return this + * @return {@code this} instance. */ public Builder setReOpen(final boolean reOpen) { this.reOpen = reOpen; @@ -263,7 +263,7 @@ public class Tailer implements Runnable, AutoCloseable { * Sets the daemon thread startup behavior. * * @param startThread whether to create a daemon thread automatically. - * @return this + * @return {@code this} instance. */ public Builder setStartThread(final boolean startThread) { this.startThread = startThread; @@ -285,7 +285,7 @@ public class Tailer implements Runnable, AutoCloseable { * Sets the listener. * * @param tailerListener the listener. - * @return this + * @return {@code this} instance. */ public Builder setTailerListener(final TailerListener tailerListener) { this.tailerListener = Objects.requireNonNull(tailerListener, "tailerListener"); @@ -296,7 +296,7 @@ public class Tailer implements Runnable, AutoCloseable { * Sets the tail start behavior. * * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file. - * @return this + * @return {@code this} instance. */ public Builder setTailFromEnd(final boolean end) { this.tailFromEnd = end; diff --git a/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java b/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java index ed518bae1..5660de16a 100644 --- a/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java @@ -116,7 +116,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the temporary file directory. * * @param directory Temporary file directory. - * @return this + * @return {@code this} instance. */ public Builder setDirectory(final File directory) { this.directory = toPath(directory, null); @@ -127,7 +127,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the temporary file directory. * * @param directory Temporary file directory. - * @return this + * @return {@code this} instance. * @since 2.14.0 */ public Builder setDirectory(final Path directory) { @@ -139,7 +139,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the file to which data is saved beyond the threshold. * * @param outputFile The file to which data is saved beyond the threshold. - * @return this + * @return {@code this} instance. */ public Builder setOutputFile(final File outputFile) { this.outputFile = toPath(outputFile, null); @@ -150,7 +150,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the file to which data is saved beyond the threshold. * * @param outputFile The file to which data is saved beyond the threshold. - * @return this + * @return {@code this} instance. * @since 2.14.0 */ public Builder setOutputFile(final Path outputFile) { @@ -162,7 +162,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the prefix to use for the temporary file. * * @param prefix Prefix to use for the temporary file. - * @return this + * @return {@code this} instance. */ public Builder setPrefix(final String prefix) { this.prefix = prefix; @@ -173,7 +173,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the suffix to use for the temporary file. * * @param suffix Suffix to use for the temporary file. - * @return this + * @return {@code this} instance. */ public Builder setSuffix(final String suffix) { this.suffix = suffix; @@ -184,7 +184,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { * Sets the number of bytes at which to trigger an event. * * @param threshold The number of bytes at which to trigger an event. - * @return this + * @return {@code this} instance. */ public Builder setThreshold(final int threshold) { this.threshold = threshold; 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 fc98fd5b8..0f60bb274 100644 --- a/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java +++ b/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java @@ -120,7 +120,7 @@ public class FileWriterWithEncoding extends ProxyWriter { * Sets whether or not to append. * * @param append Whether or not to append. - * @return this + * @return {@code this} instance. */ public Builder setAppend(final boolean append) { this.append = append; @@ -131,7 +131,7 @@ public class FileWriterWithEncoding extends ProxyWriter { * Sets charsetEncoder to use for encoding. * * @param charsetEncoder The charsetEncoder to use for encoding. - * @return this + * @return {@code this} instance. */ public Builder setCharsetEncoder(final CharsetEncoder charsetEncoder) { this.charsetEncoder = charsetEncoder; 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 b57dc2c9e..f7a8046c4 100644 --- a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java +++ b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java @@ -113,7 +113,7 @@ public class LockableFileWriter extends Writer { * Sets whether to append (true) or overwrite (false). * * @param append whether to append (true) or overwrite (false). - * @return this + * @return {@code this} instance. */ public Builder setAppend(final boolean append) { this.append = append; @@ -124,7 +124,7 @@ public class LockableFileWriter extends Writer { * Sets the directory in which the lock file should be held. * * @param lockDirectory the directory in which the lock file should be held. - * @return this + * @return {@code this} instance. */ public Builder setLockDirectory(final File lockDirectory) { this.lockDirectory = AbstractOriginSupplier.newFileOrigin(lockDirectory != null ? lockDirectory : FileUtils.getTempDirectory()); @@ -135,7 +135,7 @@ public class LockableFileWriter extends Writer { * Sets the directory in which the lock file should be held. * * @param lockDirectory the directory in which the lock file should be held. - * @return this + * @return {@code this} instance. */ public Builder setLockDirectory(final String lockDirectory) { this.lockDirectory = AbstractOriginSupplier.newFileOrigin(lockDirectory != null ? lockDirectory : FileUtils.getTempDirectoryPath()); diff --git a/src/main/java/org/apache/commons/io/output/WriterOutputStream.java b/src/main/java/org/apache/commons/io/output/WriterOutputStream.java index b61c3cee1..ce6df1539 100644 --- a/src/main/java/org/apache/commons/io/output/WriterOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/WriterOutputStream.java @@ -154,7 +154,7 @@ public class WriterOutputStream extends OutputStream { * Sets the charset decoder. * * @param charsetDecoder the charset decoder. - * @return this + * @return {@code this} instance. */ public Builder setCharsetDecoder(final CharsetDecoder charsetDecoder) { this.charsetDecoder = charsetDecoder != null ? charsetDecoder : getCharsetDefault().newDecoder(); @@ -170,7 +170,7 @@ public class WriterOutputStream extends OutputStream { * @param writeImmediately If {@code true} the output buffer will be flushed after each write operation, i.e. all available data will be written to the * underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when * {@link #flush()} or {@link #close()} is called. - * @return this + * @return {@code this} instance. */ public Builder setWriteImmediately(final boolean writeImmediately) { this.writeImmediately = writeImmediately;