Skip to content

Commit af17dc6

Browse files
committed
Javadoc
1 parent d9714be commit af17dc6

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ public abstract static class AbstractRandomAccessFileOrigin<T extends RandomAcce
366366
* </p>
367367
*
368368
* @param origin The origin, not null.
369+
* @throws NullPointerException if {@code origin} is {@code null}.
369370
*/
370371
public AbstractRandomAccessFileOrigin(final T origin) {
371372
super(origin);
@@ -437,6 +438,7 @@ public static class ByteArrayOrigin extends AbstractOrigin<byte[], ByteArrayOrig
437438
* Constructs a new instance for the given origin.
438439
*
439440
* @param origin The origin, not null.
441+
* @throws NullPointerException if {@code origin} is {@code null}.
440442
*/
441443
public ByteArrayOrigin(final byte[] origin) {
442444
super(origin);
@@ -499,6 +501,7 @@ public static class ChannelOrigin extends AbstractOrigin<Channel, ChannelOrigin>
499501
* Constructs a new instance for the given origin.
500502
*
501503
* @param origin The origin, not null.
504+
* @throws NullPointerException if {@code origin} is {@code null}.
502505
*/
503506
public ChannelOrigin(final Channel origin) {
504507
super(origin);
@@ -563,6 +566,7 @@ public static class CharSequenceOrigin extends AbstractOrigin<CharSequence, Char
563566
* Constructs a new instance for the given origin.
564567
*
565568
* @param origin The origin, not null.
569+
* @throws NullPointerException if {@code origin} is {@code null}.
566570
*/
567571
public CharSequenceOrigin(final CharSequence origin) {
568572
super(origin);
@@ -641,6 +645,7 @@ public static class FileOrigin extends AbstractOrigin<File, FileOrigin> {
641645
* Constructs a new instance for the given origin.
642646
*
643647
* @param origin The origin, not null.
648+
* @throws NullPointerException if {@code origin} is {@code null}.
644649
*/
645650
public FileOrigin(final File origin) {
646651
super(origin);
@@ -689,6 +694,7 @@ public static class InputStreamOrigin extends AbstractOrigin<InputStream, InputS
689694
* Constructs a new instance for the given origin.
690695
*
691696
* @param origin The origin, not null.
697+
* @throws NullPointerException if {@code origin} is {@code null}.
692698
*/
693699
public InputStreamOrigin(final InputStream origin) {
694700
super(origin);
@@ -774,6 +780,7 @@ public static class OutputStreamOrigin extends AbstractOrigin<OutputStream, Outp
774780
* Constructs a new instance for the given origin.
775781
*
776782
* @param origin The origin, not null.
783+
* @throws NullPointerException if {@code origin} is {@code null}.
777784
*/
778785
public OutputStreamOrigin(final OutputStream origin) {
779786
super(origin);
@@ -823,6 +830,7 @@ public static class PathOrigin extends AbstractOrigin<Path, PathOrigin> {
823830
* Constructs a new instance for the given origin.
824831
*
825832
* @param origin The origin, not null.
833+
* @throws NullPointerException if {@code origin} is {@code null}.
826834
*/
827835
public PathOrigin(final Path origin) {
828836
super(origin);
@@ -892,6 +900,7 @@ public static class ReaderOrigin extends AbstractOrigin<Reader, ReaderOrigin> {
892900
* Constructs a new instance for the given origin.
893901
*
894902
* @param origin The origin, not null.
903+
* @throws NullPointerException if {@code origin} is {@code null}.
895904
*/
896905
public ReaderOrigin(final Reader origin) {
897906
super(origin);
@@ -959,6 +968,7 @@ public static class URIOrigin extends AbstractOrigin<URI, URIOrigin> {
959968
* Constructs a new instance for the given origin.
960969
*
961970
* @param origin The origin, not null.
971+
* @throws NullPointerException if {@code origin} is {@code null}.
962972
*/
963973
public URIOrigin(final URI origin) {
964974
super(origin);
@@ -1007,6 +1017,7 @@ public static class WriterOrigin extends AbstractOrigin<Writer, WriterOrigin> {
10071017
* Constructs a new instance for the given origin.
10081018
*
10091019
* @param origin The origin, not null.
1020+
* @throws NullPointerException if {@code origin} is {@code null}.
10101021
*/
10111022
public WriterOrigin(final Writer origin) {
10121023
super(origin);
@@ -1057,15 +1068,16 @@ public Writer getWriter(final Charset charset, final OpenOption... options) thro
10571068
* Constructs a new instance for subclasses.
10581069
*
10591070
* @param origin The origin, not null.
1071+
* @throws NullPointerException if {@code origin} is {@code null}.
10601072
*/
10611073
protected AbstractOrigin(final T origin) {
10621074
this.origin = Objects.requireNonNull(origin, "origin");
10631075
}
10641076

10651077
/**
1066-
* Gets the origin.
1078+
* Gets the origin, never null.
10671079
*
1068-
* @return the origin.
1080+
* @return the origin, never null.
10691081
*/
10701082
@Override
10711083
public T get() {
@@ -1113,6 +1125,7 @@ public byte[] getByteArray(final long position, final int length) throws IOExcep
11131125
* @param <C> The type of channel to return.
11141126
* @throws IOException If an I/O error occurs.
11151127
* @throws UnsupportedOperationException If this origin cannot be converted to a channel of the given type.
1128+
* @see #getChannel(OpenOption...)
11161129
* @since 2.21.0
11171130
*/
11181131
public final <C extends Channel> C getChannel(final Class<C> channelType, final OpenOption... options) throws IOException {
@@ -1131,6 +1144,7 @@ public final <C extends Channel> C getChannel(final Class<C> channelType, final
11311144
* @return A new Channel on the origin.
11321145
* @throws IOException If an I/O error occurs.
11331146
* @throws UnsupportedOperationException If this origin cannot be converted to a channel.
1147+
* @see #getChannel(Class, OpenOption...)
11341148
* @since 2.21.0
11351149
*/
11361150
protected Channel getChannel(final OpenOption... options) throws IOException {
@@ -1217,6 +1231,11 @@ public Reader getReader(final Charset charset) throws IOException {
12171231
return Files.newBufferedReader(getPath(), Charsets.toCharset(charset));
12181232
}
12191233

1234+
/**
1235+
* Gets simple name of the underlying class.
1236+
*
1237+
* @return The simple name of the underlying class.
1238+
*/
12201239
private String getSimpleClassName() {
12211240
return getClass().getSimpleName();
12221241
}

0 commit comments

Comments
 (0)