Skip to content

Commit d199660

Browse files
committed
Javadoc
1 parent ce78b3c commit d199660

6 files changed

Lines changed: 61 additions & 30 deletions

File tree

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

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,38 @@
3434
* documentation for your implementation to see if any other encodings are supported. </cite>
3535
* </p>
3636
*
37-
* <ul>
38-
* <li>{@code US-ASCII}<br>
39-
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</li>
40-
* <li>{@code ISO-8859-1}<br>
41-
* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</li>
42-
* <li>{@code UTF-8}<br>
43-
* Eight-bit Unicode Transformation Format.</li>
44-
* <li>{@code UTF-16BE}<br>
45-
* Sixteen-bit Unicode Transformation Format, big-endian byte order.</li>
46-
* <li>{@code UTF-16LE}<br>
47-
* Sixteen-bit Unicode Transformation Format, little-endian byte order.</li>
48-
* <li>{@code UTF-16}<br>
49-
* Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order
50-
* accepted on input, big-endian used on output.)</li>
51-
* </ul>
37+
* <table>
38+
* <caption>Standard Charsets</caption>
39+
* <tr>
40+
* <th>Charset</th>
41+
* <th>Description</th>
42+
* </tr>
43+
* <tr>
44+
* <td style="white-space: nowrap">{@code US-ASCII}</td>
45+
* <td>Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</td>
46+
* </tr>
47+
* <tr>
48+
* <td style="white-space: nowrap">{@code ISO-8859-1}</td>
49+
* <td>ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</td>
50+
* </tr>
51+
* <tr>
52+
* <td style="white-space: nowrap">{@code UTF-8}</td>
53+
* <td>Eight-bit Unicode Transformation Format.</td>
54+
* </tr>
55+
* <tr>
56+
* <td style="white-space: nowrap">{@code UTF-16BE}</td>
57+
* <td>Sixteen-bit Unicode Transformation Format, big-endian byte order.</td>
58+
* </tr>
59+
* <tr>
60+
* <td style="white-space: nowrap">{@code UTF-16LE}</td>
61+
* <td>Sixteen-bit Unicode Transformation Format, little-endian byte order.</td>
62+
* </tr>
63+
* <tr>
64+
* <td style="white-space: nowrap">{@code UTF-16}</td>
65+
* <td>Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order
66+
* accepted on input, big-endian used on output.)</td>
67+
* </tr>
68+
* </table>
5269
*
5370
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
5471
* @since 2.3
@@ -80,7 +97,7 @@ public class Charsets {
8097
* </p>
8198
*
8299
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
83-
* @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}
100+
* @deprecated Use {@link java.nio.charset.StandardCharsets#ISO_8859_1}.
84101
*/
85102
@Deprecated
86103
public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1;
@@ -94,7 +111,7 @@ public class Charsets {
94111
* </p>
95112
*
96113
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
97-
* @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}
114+
* @deprecated Use {@link java.nio.charset.StandardCharsets#US_ASCII}.
98115
*/
99116
@Deprecated
100117
public static final Charset US_ASCII = StandardCharsets.US_ASCII;
@@ -109,7 +126,7 @@ public class Charsets {
109126
* </p>
110127
*
111128
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
112-
* @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}
129+
* @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_16}.
113130
*/
114131
@Deprecated
115132
public static final Charset UTF_16 = StandardCharsets.UTF_16;
@@ -123,7 +140,7 @@ public class Charsets {
123140
* </p>
124141
*
125142
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
126-
* @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}
143+
* @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_16BE}.
127144
*/
128145
@Deprecated
129146
public static final Charset UTF_16BE = StandardCharsets.UTF_16BE;
@@ -137,7 +154,7 @@ public class Charsets {
137154
* </p>
138155
*
139156
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
140-
* @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}
157+
* @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_16LE}.
141158
*/
142159
@Deprecated
143160
public static final Charset UTF_16LE = StandardCharsets.UTF_16LE;
@@ -151,7 +168,7 @@ public class Charsets {
151168
* </p>
152169
*
153170
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
154-
* @deprecated Use Java 7's {@link java.nio.charset.StandardCharsets}
171+
* @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_8}.
155172
*/
156173
@Deprecated
157174
public static final Charset UTF_8 = StandardCharsets.UTF_8;

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,9 @@ public static void skipFully(final Reader reader, final long toSkip) throws IOEx
27732773
* <li>It has network timeout associated.</li>
27742774
* </ul>
27752775
* <p>
2776-
* It can be used in favor of {@link #toByteArray(InputStream)}, since it avoids unnecessary allocation and copy of byte[].<br>
2776+
* It can be used in favor of {@link #toByteArray(InputStream)}, since it avoids unnecessary allocation and copy of byte[].
2777+
* </p>
2778+
* <p>
27772779
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
27782780
* </p>
27792781
*
@@ -2797,7 +2799,9 @@ public static InputStream toBufferedInputStream(final InputStream input) throws
27972799
* <li>It has network timeout associated.</li>
27982800
* </ul>
27992801
* <p>
2800-
* It can be used in favor of {@link #toByteArray(InputStream)}, since it avoids unnecessary allocation and copy of byte[].<br>
2802+
* It can be used in favor of {@link #toByteArray(InputStream)}, since it avoids unnecessary allocation and copy of byte[].
2803+
* </p>
2804+
* <p>
28012805
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
28022806
* </p>
28032807
*

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ protected byte[] toByteArrayImpl() {
232232
/**
233233
* Gets the current contents of this byte stream as an Input Stream. The
234234
* returned stream is backed by buffers of {@code this} stream,
235-
* avoiding memory allocation and copy, thus saving space and time.<br>
235+
* avoiding memory allocation and copy, thus saving space and time.
236236
*
237237
* @return the current contents of this output stream.
238238
* @see java.io.ByteArrayOutputStream#toByteArray()
@@ -244,7 +244,7 @@ protected byte[] toByteArrayImpl() {
244244
/**
245245
* Gets the current contents of this byte stream as an Input Stream. The
246246
* returned stream is backed by buffers of {@code this} stream,
247-
* avoiding memory allocation and copy, thus saving space and time.<br>
247+
* avoiding memory allocation and copy, thus saving space and time.
248248
*
249249
* @param <S> the type of the InputStream which makes up
250250
* the {@link SequenceInputStream}.

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public class ByteArrayOutputStream extends AbstractByteArrayOutputStream<ByteArr
4040
* <li>It has network timeout associated.</li>
4141
* </ul>
4242
* <p>
43-
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].<br>
43+
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].
44+
* </p>
45+
* <p>
4446
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
4547
* </p>
4648
*
@@ -65,7 +67,9 @@ public static InputStream toBufferedInputStream(final InputStream input)
6567
* <li>It has network timeout associated.</li>
6668
* </ul>
6769
* <p>
68-
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].<br>
70+
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].
71+
* </p>
72+
* <p>
6973
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
7074
* </p>
7175
*

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,10 @@ protected void thresholdReached() throws IOException {
451451

452452
/**
453453
* Converts the current contents of this byte stream to an {@link InputStream}. If the data for this output stream has been retained in memory, the returned
454-
* stream is backed by buffers of {@code this} stream, avoiding memory allocation and copy, thus saving space and time.<br>
454+
* stream is backed by buffers of {@code this} stream, avoiding memory allocation and copy, thus saving space and time.
455+
* <p>
455456
* Otherwise, the returned stream will be one that is created from the data that has been committed to disk.
457+
* </p>
456458
*
457459
* @return the current contents of this output stream.
458460
* @throws IOException if this stream is not yet closed or an error occurs.

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ public static Builder builder() {
113113
* <li>It has network timeout associated.</li>
114114
* </ul>
115115
* <p>
116-
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].<br>
116+
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].
117+
* </p>
118+
* <p>
117119
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
118120
* </p>
119121
*
@@ -136,7 +138,9 @@ public static InputStream toBufferedInputStream(final InputStream input) throws
136138
* <li>It has network timeout associated.</li>
137139
* </ul>
138140
* <p>
139-
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].<br>
141+
* It can be used in favor of {@link #toByteArray()}, since it avoids unnecessary allocation and copy of byte[].
142+
* </p>
143+
* <p>
140144
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
141145
* </p>
142146
*

0 commit comments

Comments
 (0)