Skip to content

Commit d61a06a

Browse files
committed
Javadoc
1 parent 66db0c6 commit d61a06a

File tree

5 files changed

+42
-8
lines changed

5 files changed

+42
-8
lines changed

src/main/java/org/apache/commons/io/build/AbstractOrigin.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@
5858
import org.apache.commons.io.output.WriterOutputStream;
5959

6060
/**
61-
* Abstract base class that encapsulates the <em>origin</em> of data used by Commons IO builders.
61+
* Abstracts and wraps an <em>origin</em> for builders, where an origin is a {@code byte[]}, {@link Channel}, {@link CharSequence}, {@link File},
62+
* {@link InputStream}, {@link IORandomAccessFile}, {@link OutputStream}, {@link Path}, {@link RandomAccessFile}, {@link Reader}, {@link URI},
63+
* or {@link Writer}.
6264
* <p>
63-
* An origin represents where bytes/characters come from or go to, such as a {@link File}, {@link Path},
64-
* {@link Reader}, {@link Writer}, {@link InputStream}, {@link OutputStream}, or {@link URI}. Concrete subclasses
65+
* An origin represents where bytes/characters come from or go to. Concrete subclasses
6566
* expose only the operations that make sense for the underlying source or sink; invoking an unsupported operation
6667
* results in {@link UnsupportedOperationException} (see, for example, {@link #getFile()} and {@link #getPath()}).
6768
* </p>

src/main/java/org/apache/commons/io/build/AbstractOriginSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import org.apache.commons.io.build.AbstractOrigin.WriterOrigin;
4444

4545
/**
46-
* Abstracts building an instance of {@code T}.
46+
* Abstracts <em>building</em> an instance of type {@code T} where {@code T} is unbounded from a wrapped {@linkplain AbstractOrigin origin}.
4747
*
4848
* @param <T> the type of instances to build.
4949
* @param <B> the type of builder subclass.

src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
import org.apache.commons.io.file.PathUtils;
3737

3838
/**
39-
* Abstracts building a typed instance of {@code T}.
39+
* Abstracts <em>building</em> a typed instance of type {@code T} where {@code T} is unbounded. This class contains various properties like a buffer size,
40+
* buffer size checker, a buffer size default, buffer size maximum, Charset, Charset default, default size checker, and open options. A subclass may use all,
41+
* some, or none of these properties in building instances of {@code T}.
4042
*
4143
* @param <T> the type of instances to build.
4244
* @param <B> the type of builder subclass.

src/main/java/org/apache/commons/io/build/AbstractSupplier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.apache.commons.io.function.IOSupplier;
2121

2222
/**
23-
* Abstracts supplying an instance of {@code T}.
23+
* Abstracts <em>supplying</em> an instance of type {@code T} where {@code T} is unbounded. This class carries no state.
2424
* <p>
2525
* Extend this class to implement the builder pattern.
2626
* </p>
@@ -120,6 +120,7 @@ public void test() {
120120
*
121121
* @param <T> the type of instances to build.
122122
* @param <B> the type of builder subclass.
123+
* @see IOSupplier
123124
* @since 2.12.0
124125
*/
125126
public abstract class AbstractSupplier<T, B extends AbstractSupplier<T, B>> implements IOSupplier<T> {

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

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,40 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
1817
/**
19-
* Provides classes to implement IO builders.
18+
* Provides classes to implement the builder pattern for IO classes.
19+
*
20+
* <p>
21+
* The main classes in this package are (indentation reflects hierarchy):
22+
* </p>
23+
* <ul>
24+
* <li>The root class {@linkplain org.apache.commons.io.build.AbstractSupplier AbstractSupplier} abstracts <em>supplying</em> an instance of type {@code T}
25+
* where {@code T} is unbounded. This class carries no state.
26+
* <ul>
27+
*
28+
* <li>{@linkplain org.apache.commons.io.build.AbstractOrigin AbstractOrigin} extends {@linkplain org.apache.commons.io.build.AbstractSupplier AbstractSupplier}
29+
* to abstract and wrap an <em>origin</em> for builders, where an origin is a {@code byte[]}, {@linkplain java.nio.channels.Channel Channel},
30+
* {@linkplain java.lang.CharSequence CharSequence}, {@linkplain java.io.File File}, {@linkplain java.io.InputStream InputStream},
31+
* {@linkplain org.apache.commons.io.IORandomAccessFile IORandomAccessFile}, {@linkplain java.io.OutputStream OutputStream}, {@linkplain java.nio.file.Path
32+
* Path}, {@linkplain java.io.RandomAccessFile RandomAccessFile}, {@linkplain java.io.Reader Reader}, {@linkplain java.net.URI URI}, or
33+
* {@linkplain java.io.Writer Writer}.</li>
34+
*
35+
* <li>{@linkplain org.apache.commons.io.build.AbstractOriginSupplier AbstractOriginSupplier} extends {@linkplain org.apache.commons.io.build.AbstractSupplier
36+
* AbstractSupplier} to abstract <em>building</em> an instance of type {@code T} where {@code T} is unbounded from a wrapped
37+
* {@linkplain org.apache.commons.io.build.AbstractOrigin origin}.
38+
*
39+
* <ul>
40+
* <li>{@linkplain org.apache.commons.io.build.AbstractStreamBuilder AbstractStreamBuilder} extends
41+
* {@linkplain org.apache.commons.io.build.AbstractOriginSupplier AbstractOriginSupplier} to abstract <em>building</em> a typed instance of type {@code T} where
42+
* {@code T} is unbounded. This class contains various properties like a buffer size, buffer size checker, a buffer size default, buffer size maximum, Charset,
43+
* Charset default, default size checker, and open options. A subclass may use all, some, or none of these properties in building instances of {@code T}.</li>
44+
* </ul>
45+
* </li>
46+
* </ul>
47+
* </li>
48+
* </ul>
2049
*
2150
* @since 2.12.0
2251
*/
52+
2353
package org.apache.commons.io.build;

0 commit comments

Comments
 (0)