Skip to content

Commit a88ab5a

Browse files
committed
Javadoc and inline comments
- Clarify text, id est, 'i.e.' isn't needed - Remove obsolete Java 1.4 comment
1 parent 60e796f commit a88ab5a

File tree

12 files changed

+25
-27
lines changed

12 files changed

+25
-27
lines changed

src/main/java/org/apache/commons/io/FileUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public class FileUtils {
209209
/**
210210
* Returns a human-readable version of the file size, where the input represents a specific number of bytes.
211211
* <p>
212-
* If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
212+
* If the size is over 1GB, the size is returned as the number of whole GB, the size is rounded down to the
213213
* nearest GB boundary.
214214
* </p>
215215
* <p>
@@ -248,7 +248,7 @@ public static String byteCountToDisplaySize(final BigInteger size) {
248248
/**
249249
* Returns a human-readable version of the file size, where the input represents a specific number of bytes.
250250
* <p>
251-
* If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
251+
* If the size is over 1GB, the size is returned as the number of whole GB, the size is rounded down to the
252252
* nearest GB boundary.
253253
* </p>
254254
* <p>
@@ -267,7 +267,7 @@ public static String byteCountToDisplaySize(final long size) {
267267
/**
268268
* Returns a human-readable version of the file size, where the input represents a specific number of bytes.
269269
* <p>
270-
* If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
270+
* If the size is over 1GB, the size is returned as the number of whole GB, the size is rounded down to the
271271
* nearest GB boundary.
272272
* </p>
273273
* <p>
@@ -1167,7 +1167,7 @@ public static File current() {
11671167
}
11681168

11691169
/**
1170-
* Decodes the specified URL as per RFC 3986, i.e. transforms
1170+
* Decodes the specified URL as per RFC 3986, transforming
11711171
* percent-encoded octets to characters by decoding with the UTF-8 character
11721172
* set. This function is primarily intended for usage with
11731173
* {@link java.net.URL} which unfortunately does not enforce proper URLs. As

src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* <p>
2929
* This comparator can be used to sort lists or arrays of files by combining a number of other comparators.
3030
* <p>
31-
* Example of sorting a list of files by type (i.e. directory or file) and then by name:
31+
* Example of sorting a list of files by type (directory or file) and then by name:
3232
*
3333
* <pre>
3434
* CompositeFileComparator comparator = new CompositeFileComparator(

src/main/java/org/apache/commons/io/comparator/ReverseFileComparator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public ReverseFileComparator(final Comparator<File> delegate) {
4949
*
5050
* @param file1 The first file to compare.
5151
* @param file2 The second file to compare.
52-
* @return the result from the delegate {@link Comparator#compare(Object, Object)} reversing the value (i.e.
53-
* positive becomes negative and vice versa).
52+
* @return the result from the delegate {@link Comparator#compare(Object, Object)} reversing the value,
53+
* positive becomes negative and vice versa.
5454
*/
5555
@Override
5656
public int compare(final File file1, final File file2) {

src/main/java/org/apache/commons/io/comparator/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* to compare (and sort lists or arrays of files) by combining a number of other comparators.
4343
* </p>
4444
* <p>
45-
* For example, to sort an array of files by type (i.e. directory or file)
45+
* For example, to sort an array of files by type (directory or file)
4646
* and then by name:
4747
* </p>
4848
* <pre>

src/main/java/org/apache/commons/io/filefilter/HiddenFileFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
*
4141
* <p>
4242
* Example, showing how to print out a list of the
43-
* current directory's <em>visible</em> (i.e. not hidden) files:
43+
* current directory's <em>visible</em> (not hidden) files:
4444
* </p>
4545
*
4646
* <pre>

src/main/java/org/apache/commons/io/input/ReaderInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
* <p>
7272
* Note that while there are use cases where there is no alternative to using this class, very often the need to use this class is an indication of a flaw in
7373
* the design of the code. This class is typically used in situations where an existing API only accepts an {@link InputStream}, but where the most natural way
74-
* to produce the data is as a character stream, i.e. by providing a {@link Reader} instance. An example of a situation where this problem may appear is when
74+
* to produce the data is as a character stream, by providing a {@link Reader} instance. An example of a situation where this problem may appear is when
7575
* implementing the {@code javax.activation.DataSource} interface from the Java Activation Framework.
7676
* </p>
7777
* <p>

src/main/java/org/apache/commons/io/input/UnsynchronizedByteArrayInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private static int requireNonNegative(final int value, final String name) {
178178
/**
179179
* End Of Data.
180180
*
181-
* Similar to data.length, i.e. the last readable offset + 1.
181+
* Similar to data.length, which is the last readable offset + 1.
182182
*/
183183
private final int eod;
184184

src/main/java/org/apache/commons/io/output/ChunkedWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class ChunkedWriter extends FilterWriter {
3333

3434
/**
35-
* The default chunk size to use, i.e. {@value} bytes.
35+
* The default chunk size to use: {@value} bytes.
3636
*/
3737
private static final int DEFAULT_CHUNK_SIZE = IOUtils.DEFAULT_BUFFER_SIZE;
3838

src/main/java/org/apache/commons/io/output/StringBuilderWriter.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@
2323
/**
2424
* {@link Writer} implementation that outputs to a {@link StringBuilder}.
2525
* <p>
26-
* <strong>NOTE:</strong> This implementation, as an alternative to
27-
* {@link StringWriter}, provides an <em>un-synchronized</em>
28-
* (i.e. for use in a single thread) implementation for better performance.
29-
* For safe usage with multiple {@link Thread}s then
30-
* {@link StringWriter} should be used.
26+
* <strong>NOTE:</strong> This implementation, as an alternative to {@link StringWriter}, provides an <em>un-synchronized</em> implementation for better
27+
* performance for use in a single thread. For safe usage with multiple {@link Thread}s, a {@link StringWriter} should be used.
3128
* </p>
3229
* <h2>Deprecating Serialization</h2>
3330
* <p>
3431
* <em>Serialization is deprecated and will be removed in 3.0.</em>
3532
* </p>
33+
*
3634
* @since 2.0
3735
*/
3836
public class StringBuilderWriter extends Writer implements Serializable {

src/main/java/org/apache/commons/io/output/WriterOutputStream.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ public Builder setCharsetDecoder(final CharsetDecoder charsetDecoder) {
166166
}
167167

168168
/**
169-
* Sets whether the output buffer will be flushed after each write operation ({@code true}), i.e. all available data will be written to the underlying
170-
* {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when {@link #flush()} or {@link #close()}
171-
* is called.
169+
* Sets whether the output buffer will be flushed after each write operation ({@code true}), meaning all available data will be written to the
170+
* underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when {@link #flush()} or
171+
* {@link #close()} is called.
172172
*
173-
* @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
174-
* underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when
173+
* @param writeImmediately If {@code true} the output buffer will be flushed after each write operation, meaning all available data will be written to
174+
* the underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when
175175
* {@link #flush()} or {@link #close()} is called.
176176
* @return {@code this} instance.
177177
*/
@@ -275,7 +275,7 @@ public WriterOutputStream(final Writer writer, final Charset charset) {
275275
* @param writer the target {@link Writer}
276276
* @param charset the charset encoding
277277
* @param bufferSize the size of the output buffer in number of characters
278-
* @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
278+
* @param writeImmediately If {@code true} the output buffer will be flushed after each write operation, meaning all available data will be written to the
279279
* underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when
280280
* {@link #flush()} or {@link #close()} is called.
281281
* @deprecated Use {@link #builder()}, {@link Builder}, and {@link Builder#get()}
@@ -313,7 +313,7 @@ public WriterOutputStream(final Writer writer, final CharsetDecoder decoder) {
313313
* @param writer the target {@link Writer}
314314
* @param decoder the charset decoder
315315
* @param bufferSize the size of the output buffer in number of characters
316-
* @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
316+
* @param writeImmediately If {@code true} the output buffer will be flushed after each write operation, meaning all available data will be written to the
317317
* underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when
318318
* {@link #flush()} or {@link #close()} is called.
319319
* @since 2.1
@@ -347,7 +347,7 @@ public WriterOutputStream(final Writer writer, final String charsetName) {
347347
* @param writer the target {@link Writer}
348348
* @param charsetName the name of the charset encoding
349349
* @param bufferSize the size of the output buffer in number of characters
350-
* @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
350+
* @param writeImmediately If {@code true} the output buffer will be flushed after each write operation, meaning all available data will be written to the
351351
* underlying {@link Writer} immediately. If {@code false}, the output buffer will only be flushed when it overflows or when
352352
* {@link #flush()} or {@link #close()} is called.
353353
* @deprecated Use {@link #builder()}, {@link Builder}, and {@link Builder#get()}

0 commit comments

Comments
 (0)