Skip to content

Commit cfb8f3c

Browse files
committed
Javadoc
1 parent 494c5a2 commit cfb8f3c

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public abstract class AbstractOrigin<T, B extends AbstractOrigin<T, B>> extends
4545
*/
4646
public static class FileOrigin extends AbstractOrigin<File, FileOrigin> {
4747

48+
/**
49+
* Constructs a new instance for the given origin.
50+
*
51+
* @param origin The origin.
52+
*/
4853
public FileOrigin(final File origin) {
4954
super(origin);
5055
}
@@ -69,6 +74,11 @@ public Path getPath() {
6974
*/
7075
public static class InputStreamOrigin extends AbstractOrigin<InputStream, InputStreamOrigin> {
7176

77+
/**
78+
* Constructs a new instance for the given origin.
79+
*
80+
* @param origin The origin.
81+
*/
7282
public InputStreamOrigin(final InputStream origin) {
7383
super(origin);
7484
}
@@ -88,6 +98,11 @@ public InputStream getInputStream(final OpenOption... options) {
8898
*/
8999
public static class OutputStreamOrigin extends AbstractOrigin<OutputStream, OutputStreamOrigin> {
90100

101+
/**
102+
* Constructs a new instance for the given origin.
103+
*
104+
* @param origin The origin.
105+
*/
91106
public OutputStreamOrigin(final OutputStream origin) {
92107
super(origin);
93108
}
@@ -104,6 +119,11 @@ public OutputStream getOutputStream(final OpenOption... options) {
104119
*/
105120
public static class PathOrigin extends AbstractOrigin<Path, PathOrigin> {
106121

122+
/**
123+
* Constructs a new instance for the given origin.
124+
*
125+
* @param origin The origin.
126+
*/
107127
public PathOrigin(final Path origin) {
108128
super(origin);
109129
}
@@ -128,6 +148,11 @@ public Path getPath() {
128148
*/
129149
public static class ReaderOrigin extends AbstractOrigin<Reader, ReaderOrigin> {
130150

151+
/**
152+
* Constructs a new instance for the given origin.
153+
*
154+
* @param origin The origin.
155+
*/
131156
public ReaderOrigin(final Reader origin) {
132157
super(origin);
133158
}
@@ -143,6 +168,11 @@ public Reader getReader(final Charset charset) throws IOException {
143168
*/
144169
public static class URIOrigin extends AbstractOrigin<URI, URIOrigin> {
145170

171+
/**
172+
* Constructs a new instance for the given origin.
173+
*
174+
* @param origin The origin.
175+
*/
146176
public URIOrigin(final URI origin) {
147177
super(origin);
148178
}
@@ -172,6 +202,11 @@ public Path getPath() {
172202
*/
173203
public static class WriterOrigin extends AbstractOrigin<Writer, WriterOrigin> {
174204

205+
/**
206+
* Constructs a new instance for the given origin.
207+
*
208+
* @param origin The origin.
209+
*/
175210
public WriterOrigin(final Writer origin) {
176211
super(origin);
177212
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
*/
4545
public abstract class AbstractOriginSupplier<T, B extends AbstractOriginSupplier<T, B>> extends AbstractSupplier<T, B> {
4646

47+
/**
48+
* Throws {@link IllegalArgumentException} if the initialBufferSize is less than zero.
49+
*
50+
* @param initialBufferSize the value to test.
51+
* @return the input value.
52+
*/
4753
protected static int checkBufferSize(final int initialBufferSize) {
4854
if (initialBufferSize < 0) {
4955
throw new IllegalArgumentException("Initial buffer size must be at least 0.");

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
*/
3232
public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T, B>> extends AbstractOriginSupplier<T, B> {
3333

34+
/**
35+
* Throws {@link IllegalArgumentException} if the initialBufferSize is less than zero.
36+
*
37+
* @param initialBufferSize the value to test.
38+
* @return the input value.
39+
*/
3440
protected static int checkBufferSize(final int initialBufferSize) {
3541
if (initialBufferSize < 0) {
3642
throw new IllegalArgumentException("Initial buffer size must be at least 0.");

0 commit comments

Comments
 (0)