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 c9fd7fc57 Javadoc c9fd7fc57 is described below commit c9fd7fc573055093059b87618b1c0b9b758f0f86 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Jun 18 09:06:56 2024 -0400 Javadoc --- src/main/java/org/apache/commons/io/CopyUtils.java | 2 +- src/main/java/org/apache/commons/io/FileSystemUtils.java | 3 ++- src/main/java/org/apache/commons/io/FileUtils.java | 2 +- src/main/java/org/apache/commons/io/FilenameUtils.java | 4 ++-- src/main/java/org/apache/commons/io/IOCase.java | 3 ++- src/main/java/org/apache/commons/io/IOUtils.java | 10 ++++++---- src/main/java/org/apache/commons/io/file/PathUtils.java | 8 ++++---- .../java/org/apache/commons/io/filefilter/AndFileFilter.java | 3 ++- .../java/org/apache/commons/io/filefilter/IOFileFilter.java | 4 ++-- .../java/org/apache/commons/io/filefilter/OrFileFilter.java | 3 ++- src/main/java/org/apache/commons/io/input/BoundedReader.java | 2 +- .../commons/io/input/BufferedFileChannelInputStream.java | 3 ++- .../org/apache/commons/io/input/MarkShieldInputStream.java | 3 ++- .../java/org/apache/commons/io/input/QueueInputStream.java | 2 +- .../java/org/apache/commons/io/input/ReaderInputStream.java | 11 +++++++---- .../commons/io/input/UnsynchronizedByteArrayInputStream.java | 2 +- .../commons/io/input/buffer/CircularBufferInputStream.java | 3 ++- .../org/apache/commons/io/output/AppendableOutputStream.java | 3 ++- .../org/apache/commons/io/output/FileWriterWithEncoding.java | 2 +- .../java/org/apache/commons/io/output/LockableFileWriter.java | 5 +++-- .../java/org/apache/commons/io/output/QueueOutputStream.java | 2 +- .../org/apache/commons/io/output/StringBuilderWriter.java | 5 +++-- .../java/org/apache/commons/io/output/WriterOutputStream.java | 11 +++++++---- 23 files changed, 57 insertions(+), 39 deletions(-) diff --git a/src/main/java/org/apache/commons/io/CopyUtils.java b/src/main/java/org/apache/commons/io/CopyUtils.java index ad562aa67..72da100a5 100644 --- a/src/main/java/org/apache/commons/io/CopyUtils.java +++ b/src/main/java/org/apache/commons/io/CopyUtils.java @@ -68,7 +68,7 @@ import java.nio.charset.Charset; * Imagine that an InputStream's read() is a very expensive operation, which * would usually suggest wrapping in a BufferedInputStream. The * BufferedInputStream works by issuing infrequent - * {@link java.io.InputStream#read(byte[] b, int off, int len)} requests on the + * {@link InputStream#read(byte[] b, int off, int len)} requests on the * underlying InputStream, to fill an internal buffer, from which further * {@code read} requests can inexpensively get their data (until the buffer * runs out). diff --git a/src/main/java/org/apache/commons/io/FileSystemUtils.java b/src/main/java/org/apache/commons/io/FileSystemUtils.java index c32142ba7..cfa10205b 100644 --- a/src/main/java/org/apache/commons/io/FileSystemUtils.java +++ b/src/main/java/org/apache/commons/io/FileSystemUtils.java @@ -16,6 +16,7 @@ */ package org.apache.commons.io; +import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -25,7 +26,7 @@ import java.util.Objects; /** * General File System utilities. * <p> - * This class provides static utility methods for general file system functions not provided before Java 6's {@link java.io.File File} class. + * This class provides static utility methods for general file system functions not provided before Java 6's {@link File File} class. * </p> * <p> * The current functions provided are: diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java index 779f07812..aac463675 100644 --- a/src/main/java/org/apache/commons/io/FileUtils.java +++ b/src/main/java/org/apache/commons/io/FileUtils.java @@ -1513,7 +1513,7 @@ public class FileUtils { * WARNING: this method relies on the Java system property 'java.io.tmpdir' * which may or may not have a trailing file separator. * This can affect code that uses String processing to manipulate pathnames rather - * than the standard libary methods in classes such as {@link java.io.File} + * than the standard libary methods in classes such as {@link File} * * @return the path to the system temporary directory as a String * @since 2.0 diff --git a/src/main/java/org/apache/commons/io/FilenameUtils.java b/src/main/java/org/apache/commons/io/FilenameUtils.java index b8c92f15e..508f2da90 100644 --- a/src/main/java/org/apache/commons/io/FilenameUtils.java +++ b/src/main/java/org/apache/commons/io/FilenameUtils.java @@ -38,8 +38,8 @@ import java.util.stream.Stream; * </p> * <p> * <b>NOTE</b>: You may be able to avoid using this class entirely simply by - * using JDK {@link java.io.File File} objects and the two argument constructor - * {@link java.io.File#File(java.io.File, String) File(File,String)}. + * using JDK {@link File File} objects and the two argument constructor + * {@link File#File(java.io.File, String) File(File,String)}. * </p> * <p> * Most methods in this class are designed to work the same on both UNIX and Windows. diff --git a/src/main/java/org/apache/commons/io/IOCase.java b/src/main/java/org/apache/commons/io/IOCase.java index 40a64b756..c803b2fe0 100644 --- a/src/main/java/org/apache/commons/io/IOCase.java +++ b/src/main/java/org/apache/commons/io/IOCase.java @@ -16,6 +16,7 @@ */ package org.apache.commons.io; +import java.io.File; import java.util.Objects; import java.util.stream.Stream; @@ -56,7 +57,7 @@ public enum IOCase { * <strong>Note:</strong> This only caters for Windows and Unix. Other operating * systems (e.g. OSX and OpenVMS) are treated as case-sensitive if they use the * UNIX file separator and case-insensitive if they use the Windows file separator - * (see {@link java.io.File#separatorChar}). + * (see {@link File#separatorChar}). * </p> * <p> * If you serialize this constant on Windows, and deserialize on Unix, or vice diff --git a/src/main/java/org/apache/commons/io/IOUtils.java b/src/main/java/org/apache/commons/io/IOUtils.java index 3a4f5ae41..68cce4578 100644 --- a/src/main/java/org/apache/commons/io/IOUtils.java +++ b/src/main/java/org/apache/commons/io/IOUtils.java @@ -30,6 +30,8 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; import java.io.Reader; import java.io.UncheckedIOException; import java.io.Writer; @@ -1184,9 +1186,9 @@ public class IOUtils { } /** - * Copies bytes from a {@link java.io.ByteArrayOutputStream} to a {@link QueueInputStream}. + * Copies bytes from a {@link ByteArrayOutputStream} to a {@link QueueInputStream}. * <p> - * Unlike using JDK {@link java.io.PipedInputStream} and {@link java.io.PipedOutputStream} for this, this + * Unlike using JDK {@link PipedInputStream} and {@link PipedOutputStream} for this, this * solution works safely in a single thread environment. * </p> * <p> @@ -1200,9 +1202,9 @@ public class IOUtils { * InputStream inputStream = IOUtils.copy(outputStream); * </pre> * - * @param outputStream the {@link java.io.ByteArrayOutputStream} to read. + * @param outputStream the {@link ByteArrayOutputStream} to read. * @return the {@link QueueInputStream} filled with the content of the outputStream. - * @throws NullPointerException if the {@link java.io.ByteArrayOutputStream} is {@code null}. + * @throws NullPointerException if the {@link ByteArrayOutputStream} is {@code null}. * @throws IOException if an I/O error occurs. * @since 2.12 */ 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 59d06b677..3758867a5 100644 --- a/src/main/java/org/apache/commons/io/file/PathUtils.java +++ b/src/main/java/org/apache/commons/io/file/PathUtils.java @@ -416,11 +416,11 @@ public final class PathUtils { /** * Deletes a file or directory. If the path is a directory, delete it and all subdirectories. * <p> - * The difference between File.delete() and this method are: + * The difference between {@link File#delete()} and this method are: * </p> * <ul> * <li>A directory to delete does not have to be empty.</li> - * <li>You get exceptions when a file or directory cannot be deleted; {@link java.io.File#delete()} returns a boolean. + * <li>You get exceptions when a file or directory cannot be deleted; {@link File#delete()} returns a boolean. * </ul> * * @param path file or directory to delete, must not be {@code null} @@ -439,7 +439,7 @@ public final class PathUtils { * </p> * <ul> * <li>A directory to delete does not have to be empty.</li> - * <li>You get exceptions when a file or directory cannot be deleted; {@link java.io.File#delete()} returns a boolean. + * <li>You get exceptions when a file or directory cannot be deleted; {@link File#delete()} returns a boolean. * </ul> * * @param path file or directory to delete, must not be {@code null} @@ -461,7 +461,7 @@ public final class PathUtils { * </p> * <ul> * <li>A directory to delete does not have to be empty.</li> - * <li>You get exceptions when a file or directory cannot be deleted; {@link java.io.File#delete()} returns a boolean. + * <li>You get exceptions when a file or directory cannot be deleted; {@link File#delete()} returns a boolean. * </ul> * * @param path file or directory to delete, must not be {@code null} 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 4b9987d7b..62a3e0f1f 100644 --- a/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/AndFileFilter.java @@ -17,6 +17,7 @@ package org.apache.commons.io.filefilter; import java.io.File; +import java.io.FileFilter; import java.io.Serializable; import java.nio.file.FileVisitResult; import java.nio.file.Path; @@ -28,7 +29,7 @@ import java.util.Objects; import java.util.stream.Stream; /** - * A {@link java.io.FileFilter} providing conditional AND logic across a list of + * A {@link FileFilter} providing conditional AND logic across a list of * file filters. This filter returns {@code true} if all filters in the * list return {@code true}. Otherwise, it returns {@code false}. * Checking of the file filter list stops when the first filter returns diff --git a/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java index c1562df50..682bf43e7 100644 --- a/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/IOFileFilter.java @@ -41,7 +41,7 @@ public interface IOFileFilter extends FileFilter, FilenameFilter, PathFilter, Pa /** * Tests if a File should be accepted by this filter. * <p> - * Defined in {@link java.io.FileFilter}. + * Defined in {@link FileFilter}. * </p> * * @param file the File to check. @@ -53,7 +53,7 @@ public interface IOFileFilter extends FileFilter, FilenameFilter, PathFilter, Pa /** * Tests if a File should be accepted by this filter. * <p> - * Defined in {@link java.io.FilenameFilter}. + * Defined in {@link FilenameFilter}. * </p> * * @param dir the directory File to check. 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 7d9a36667..4c6e82a09 100644 --- a/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/OrFileFilter.java @@ -17,6 +17,7 @@ package org.apache.commons.io.filefilter; import java.io.File; +import java.io.FileFilter; import java.io.Serializable; import java.nio.file.FileVisitResult; import java.nio.file.Path; @@ -28,7 +29,7 @@ import java.util.Objects; import java.util.stream.Stream; /** - * A {@link java.io.FileFilter} providing conditional OR logic across a list of file filters. This filter returns + * A {@link FileFilter} providing conditional OR logic across a list of file filters. This filter returns * {@code true} if any filters in the list return {@code true}. Otherwise, it returns {@code false}. Checking of the * file filter list stops when the first filter returns {@code true}. * <h2>Deprecating Serialization</h2> diff --git a/src/main/java/org/apache/commons/io/input/BoundedReader.java b/src/main/java/org/apache/commons/io/input/BoundedReader.java index 6a226e22d..80423f909 100644 --- a/src/main/java/org/apache/commons/io/input/BoundedReader.java +++ b/src/main/java/org/apache/commons/io/input/BoundedReader.java @@ -28,7 +28,7 @@ import java.io.Reader; * when this limit is reached, regardless of state of underlying reader. * * <p> - * One use case is to avoid overrunning the readAheadLimit supplied to {@link java.io.Reader#mark(int)}, since reading + * One use case is to avoid overrunning the readAheadLimit supplied to {@link Reader#mark(int)}, since reading * too many characters removes the ability to do a successful reset. * </p> * diff --git a/src/main/java/org/apache/commons/io/input/BufferedFileChannelInputStream.java b/src/main/java/org/apache/commons/io/input/BufferedFileChannelInputStream.java index 870c1e448..593407230 100644 --- a/src/main/java/org/apache/commons/io/input/BufferedFileChannelInputStream.java +++ b/src/main/java/org/apache/commons/io/input/BufferedFileChannelInputStream.java @@ -15,6 +15,7 @@ package org.apache.commons.io.input; import static org.apache.commons.io.IOUtils.EOF; +import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -29,7 +30,7 @@ import org.apache.commons.io.build.AbstractStreamBuilder; /** * {@link InputStream} implementation which uses direct buffer to read a file to avoid extra copy of data between Java and native memory which happens when - * using {@link java.io.BufferedInputStream}. Unfortunately, this is not something already available in JDK, {@code sun.nio.ch.ChannelInputStream} supports + * using {@link BufferedInputStream}. Unfortunately, this is not something already available in JDK, {@code sun.nio.ch.ChannelInputStream} supports * reading a file using NIO, but does not support buffering. * <p> * To build an instance, use {@link Builder}. diff --git a/src/main/java/org/apache/commons/io/input/MarkShieldInputStream.java b/src/main/java/org/apache/commons/io/input/MarkShieldInputStream.java index 50079f8ef..20e560510 100644 --- a/src/main/java/org/apache/commons/io/input/MarkShieldInputStream.java +++ b/src/main/java/org/apache/commons/io/input/MarkShieldInputStream.java @@ -16,11 +16,12 @@ */ package org.apache.commons.io.input; +import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; /** - * This is an alternative to {@link java.io.ByteArrayInputStream} + * This is an alternative to {@link ByteArrayInputStream} * which removes the synchronization overhead for non-concurrent * access; as such this class is not thread-safe. * 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 5daf11b7c..874e7a7f1 100644 --- a/src/main/java/org/apache/commons/io/input/QueueInputStream.java +++ b/src/main/java/org/apache/commons/io/input/QueueInputStream.java @@ -32,7 +32,7 @@ import org.apache.commons.io.build.AbstractStreamBuilder; import org.apache.commons.io.output.QueueOutputStream; /** - * Simple alternative to JDK {@link java.io.PipedInputStream}; queue input stream provides what's written in queue output stream. + * Simple alternative to JDK {@link PipedInputStream}; queue input stream provides what's written in queue output stream. * <p> * To build an instance, use {@link Builder}. * </p> 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 c80fc5631..28e4469f5 100644 --- a/src/main/java/org/apache/commons/io/input/ReaderInputStream.java +++ b/src/main/java/org/apache/commons/io/input/ReaderInputStream.java @@ -18,8 +18,11 @@ package org.apache.commons.io.input; import static org.apache.commons.io.IOUtils.EOF; +import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; import java.io.Reader; import java.nio.ByteBuffer; import java.nio.CharBuffer; @@ -42,10 +45,10 @@ import org.apache.commons.io.charset.CharsetEncoders; * Since in general it is not possible to predict the number of characters to be read from the {@link Reader} to satisfy a read request on the * {@link ReaderInputStream}, all reads from the {@link Reader} are buffered. There is therefore no well defined correlation between the current position of the * {@link Reader} and that of the {@link ReaderInputStream}. This also implies that in general there is no need to wrap the underlying {@link Reader} in a - * {@link java.io.BufferedReader}. + * {@link BufferedReader}. * </p> * <p> - * {@link ReaderInputStream} implements the inverse transformation of {@link java.io.InputStreamReader}; in the following example, reading from {@code in2} + * {@link ReaderInputStream} implements the inverse transformation of {@link InputStreamReader}; in the following example, reading from {@code in2} * would return the same byte sequence as reading from {@code in} (provided that the initial byte sequence is legal with respect to the charset encoding): * </p> * <p> @@ -61,8 +64,8 @@ import org.apache.commons.io.charset.CharsetEncoders; * .get(); * </pre> * <p> - * {@link ReaderInputStream} implements the same transformation as {@link java.io.OutputStreamWriter}, except that the control flow is reversed: both classes - * transform a character stream into a byte stream, but {@link java.io.OutputStreamWriter} pushes data to the underlying stream, while {@link ReaderInputStream} + * {@link ReaderInputStream} implements the same transformation as {@link OutputStreamWriter}, except that the control flow is reversed: both classes + * transform a character stream into a byte stream, but {@link OutputStreamWriter} pushes data to the underlying stream, while {@link ReaderInputStream} * pulls it from the underlying stream. * </p> * <p> diff --git a/src/main/java/org/apache/commons/io/input/UnsynchronizedByteArrayInputStream.java b/src/main/java/org/apache/commons/io/input/UnsynchronizedByteArrayInputStream.java index 853281cfa..63d5678d7 100644 --- a/src/main/java/org/apache/commons/io/input/UnsynchronizedByteArrayInputStream.java +++ b/src/main/java/org/apache/commons/io/input/UnsynchronizedByteArrayInputStream.java @@ -25,7 +25,7 @@ import org.apache.commons.io.build.AbstractOrigin; import org.apache.commons.io.build.AbstractStreamBuilder; /** - * This is an alternative to {@link java.io.ByteArrayInputStream} which removes the synchronization overhead for non-concurrent access; as such this class is + * This is an alternative to {@link ByteArrayInputStream} which removes the synchronization overhead for non-concurrent access; as such this class is * not thread-safe. * <p> * To build an instance, use {@link Builder}. diff --git a/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java b/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java index e59b60e2b..2d4414f46 100644 --- a/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java +++ b/src/main/java/org/apache/commons/io/input/buffer/CircularBufferInputStream.java @@ -18,6 +18,7 @@ package org.apache.commons.io.input.buffer; import static org.apache.commons.io.IOUtils.EOF; +import java.io.BufferedInputStream; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; @@ -27,7 +28,7 @@ import org.apache.commons.io.IOUtils; /** * Implements a buffered input stream, which is internally based on a {@link CircularByteBuffer}. Unlike the - * {@link java.io.BufferedInputStream}, this one doesn't need to reallocate byte arrays internally. + * {@link BufferedInputStream}, this one doesn't need to reallocate byte arrays internally. * * @since 2.7 */ diff --git a/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java b/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java index a17c5d17f..40489a95c 100644 --- a/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/AppendableOutputStream.java @@ -18,12 +18,13 @@ package org.apache.commons.io.output; import java.io.IOException; import java.io.OutputStream; +import java.io.Writer; /** * OutputStream implementation that writes the data to an {@link Appendable} * Object. * <p> - * For example, can be used with any {@link java.io.Writer} or a {@link StringBuilder} + * For example, can be used with any {@link Writer} or a {@link StringBuilder} * or {@link StringBuffer}. * </p> * 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 3446f1493..5d46d8bcc 100644 --- a/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java +++ b/src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java @@ -41,7 +41,7 @@ import org.apache.commons.io.build.AbstractStreamBuilder; * </p> * <p> * The encoding must be specified using either the name of the {@link Charset}, the {@link Charset}, or a {@link CharsetEncoder}. If the default encoding is - * required then use the {@link java.io.FileWriter} directly, rather than this implementation. + * required then use the {@link FileWriter} directly, rather than this implementation. * </p> * <p> * To build an instance, use {@link Builder}. 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 fadeb02aa..ee1a2dcb0 100644 --- a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java +++ b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java @@ -21,6 +21,7 @@ import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; import java.io.Writer; import java.nio.charset.Charset; import java.util.Objects; @@ -265,7 +266,7 @@ public class LockableFileWriter extends Writer { * @param charsetName the name of the requested charset, null means platform default * @throws NullPointerException if the file is null * @throws IOException in case of an I/O error - * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io.UnsupportedEncodingException} in version 2.2 if the encoding is not + * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link UnsupportedEncodingException} in version 2.2 if the encoding is not * supported. * @deprecated Use {@link #builder()}, {@link Builder}, and {@link Builder#get()} */ @@ -283,7 +284,7 @@ public class LockableFileWriter extends Writer { * @param lockDir the directory in which the lock file should be held * @throws NullPointerException if the file is null * @throws IOException in case of an I/O error - * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io.UnsupportedEncodingException} in version 2.2 if the encoding is not + * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link UnsupportedEncodingException} in version 2.2 if the encoding is not * supported. * @deprecated Use {@link #builder()}, {@link Builder}, and {@link Builder#get()} */ 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 dc2319b96..66e7cdeb0 100644 --- a/src/main/java/org/apache/commons/io/output/QueueOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/QueueOutputStream.java @@ -28,7 +28,7 @@ import java.util.concurrent.LinkedBlockingQueue; import org.apache.commons.io.input.QueueInputStream; /** - * Simple alternative to JDK {@link java.io.PipedOutputStream}; queue input stream provides what's written in queue + * Simple alternative to JDK {@link PipedOutputStream}; queue input stream provides what's written in queue * output stream. * <p> * Example usage: diff --git a/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java b/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java index eb6428e67..e951946e3 100644 --- a/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java +++ b/src/main/java/org/apache/commons/io/output/StringBuilderWriter.java @@ -17,16 +17,17 @@ package org.apache.commons.io.output; import java.io.Serializable; +import java.io.StringWriter; import java.io.Writer; /** * {@link Writer} implementation that outputs to a {@link StringBuilder}. * <p> * <strong>NOTE:</strong> This implementation, as an alternative to - * {@link java.io.StringWriter}, provides an <i>un-synchronized</i> + * {@link StringWriter}, provides an <i>un-synchronized</i> * (i.e. for use in a single thread) implementation for better performance. * For safe usage with multiple {@link Thread}s then - * {@link java.io.StringWriter} should be used. + * {@link StringWriter} should be used. * </p> * <h2>Deprecating Serialization</h2> * <p> 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 ce6df1539..5794f6042 100644 --- a/src/main/java/org/apache/commons/io/output/WriterOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/WriterOutputStream.java @@ -16,8 +16,11 @@ */ package org.apache.commons.io.output; +import java.io.BufferedWriter; import java.io.IOException; +import java.io.InputStreamReader; import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.ByteBuffer; import java.nio.CharBuffer; @@ -39,12 +42,12 @@ import org.apache.commons.io.charset.CharsetDecoders; * <p> * The output of the {@link CharsetDecoder} is buffered using a fixed size buffer. This implies that the data is written to the underlying {@link Writer} in * chunks that are no larger than the size of this buffer. By default, the buffer is flushed only when it overflows or when {@link #flush()} or {@link #close()} - * is called. In general there is therefore no need to wrap the underlying {@link Writer} in a {@link java.io.BufferedWriter}. {@link WriterOutputStream} can + * is called. In general there is therefore no need to wrap the underlying {@link Writer} in a {@link BufferedWriter}. {@link WriterOutputStream} can * also be instructed to flush the buffer after each write operation. In this case, all available data is written immediately to the underlying {@link Writer}, * implying that the current position of the {@link Writer} is correlated to the current position of the {@link WriterOutputStream}. * </p> * <p> - * {@link WriterOutputStream} implements the inverse transformation of {@link java.io.OutputStreamWriter}; in the following example, writing to {@code out2} + * {@link WriterOutputStream} implements the inverse transformation of {@link OutputStreamWriter}; in the following example, writing to {@code out2} * would have the same result as writing to {@code out} directly (provided that the byte sequence is legal with respect to the charset encoding): * </p> * <p> @@ -60,8 +63,8 @@ import org.apache.commons.io.charset.CharsetDecoders; * .get(); * </pre> * <p> - * {@link WriterOutputStream} implements the same transformation as {@link java.io.InputStreamReader}, except that the control flow is reversed: both classes - * transform a byte stream into a character stream, but {@link java.io.InputStreamReader} pulls data from the underlying stream, while + * {@link WriterOutputStream} implements the same transformation as {@link InputStreamReader}, except that the control flow is reversed: both classes + * transform a byte stream into a character stream, but {@link InputStreamReader} pulls data from the underlying stream, while * {@link WriterOutputStream} pushes it to the underlying stream. * </p> * <p>