Skip to content

Commit cae58ff

Browse files
committed
Javadoc
1 parent 6e615bb commit cae58ff

5 files changed

Lines changed: 59 additions & 15 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ private static String toMessage(final List<? extends Throwable> causeList) {
6363
return String.format("%,d exception(s): %s", size(causeList), causeList);
6464
}
6565

66+
/**
67+
* List of causes.
68+
*/
6669
private final List<? extends Throwable> causeList;
6770

6871
/**

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@
3838
public class CharSequenceReader extends Reader implements Serializable {
3939

4040
private static final long serialVersionUID = 3724187752191401220L;
41+
42+
/** Source for reading. */
4143
private final CharSequence charSequence;
44+
45+
/** Reading index. */
4246
private int idx;
47+
48+
/** Reader mark. */
4349
private int mark;
4450

4551
/**

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

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,33 @@ public class XmlStreamReaderException extends IOException {
3535

3636
private static final long serialVersionUID = 1L;
3737

38+
/**
39+
* The Byte-Order-Mark (BOM) encoding or null.
40+
*/
3841
private final String bomEncoding;
3942

43+
/**
44+
* The guessed encoding.
45+
*/
4046
private final String xmlGuessEncoding;
4147

48+
/**
49+
* The XML encoding.
50+
*/
4251
private final String xmlEncoding;
4352

53+
/**
54+
* The MIME type in the content type.
55+
*/
4456
private final String contentTypeMime;
4557

58+
/**
59+
* The encoding in the content type.
60+
*/
4661
private final String contentTypeEncoding;
4762

4863
/**
49-
* Constructs an exception instance if the charset encoding could not be
64+
* Constructs an exception instance if the Charset encoding could not be
5065
* determined.
5166
* <p>
5267
* Instances of this exception are thrown by the XmlStreamReader.
@@ -63,7 +78,7 @@ public XmlStreamReaderException(final String msg, final String bomEnc,
6378
}
6479

6580
/**
66-
* Constructs an exception instance if the charset encoding could not be
81+
* Constructs an exception instance if the Charset encoding could not be
6782
* determined.
6883
* <p>
6984
* Instances of this exception are thrown by the XmlStreamReader.
@@ -87,7 +102,7 @@ public XmlStreamReaderException(final String msg, final String ctMime, final Str
87102
}
88103

89104
/**
90-
* Returns the BOM encoding found in the InputStream.
105+
* Gets the BOM encoding found in the InputStream.
91106
*
92107
* @return the BOM encoding, null if none.
93108
*/
@@ -96,7 +111,7 @@ public String getBomEncoding() {
96111
}
97112

98113
/**
99-
* Returns the encoding in the content-type used to attempt determining the
114+
* Gets the encoding in the content-type used to attempt determining the
100115
* encoding.
101116
*
102117
* @return the encoding in the content-type, null if there was not
@@ -108,7 +123,7 @@ public String getContentTypeEncoding() {
108123
}
109124

110125
/**
111-
* Returns the MIME type in the content-type used to attempt determining the
126+
* Gets the MIME type in the content-type used to attempt determining the
112127
* encoding.
113128
*
114129
* @return the MIME type in the content-type, null if there was not
@@ -119,7 +134,7 @@ public String getContentTypeMime() {
119134
}
120135

121136
/**
122-
* Returns the encoding found in the XML prolog of the InputStream.
137+
* Gets the encoding found in the XML prolog of the input.
123138
*
124139
* @return the encoding of the XML prolog, null if none.
125140
*/
@@ -128,7 +143,7 @@ public String getXmlEncoding() {
128143
}
129144

130145
/**
131-
* Returns the encoding guess based on the first bytes of the InputStream.
146+
* Gets the encoding guess based on the first bytes of the input.
132147
*
133148
* @return the encoding guess, null if it couldn't be guessed.
134149
*/

src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,25 @@
130130
public class FileAlterationObserver implements Serializable {
131131

132132
private static final long serialVersionUID = 1185122225658782848L;
133+
134+
/**
135+
* List of listeners.
136+
*/
133137
private transient final List<FileAlterationListener> listeners = new CopyOnWriteArrayList<>();
138+
139+
/**
140+
* The root directory to observe.
141+
*/
134142
private final FileEntry rootEntry;
143+
144+
/**
145+
* The file filter or null if none.
146+
*/
135147
private transient final FileFilter fileFilter;
148+
149+
/**
150+
* Compares file names.
151+
*/
136152
private final Comparator<File> comparator;
137153

138154
/**
@@ -158,9 +174,9 @@ public FileAlterationObserver(final File directory, final FileFilter fileFilter)
158174
* Constructs an observer for the specified directory, file filter and
159175
* file comparator.
160176
*
161-
* @param directory the directory to observe
162-
* @param fileFilter The file filter or null if none
163-
* @param ioCase what case sensitivity to use comparing file names, null means system sensitive
177+
* @param directory the directory to observe.
178+
* @param fileFilter The file filter or null if none.
179+
* @param ioCase what case sensitivity to use comparing file names, null means system sensitive.
164180
*/
165181
public FileAlterationObserver(final File directory, final FileFilter fileFilter, final IOCase ioCase) {
166182
this(new FileEntry(directory), fileFilter, ioCase);
@@ -169,9 +185,9 @@ public FileAlterationObserver(final File directory, final FileFilter fileFilter,
169185
/**
170186
* Constructs an observer for the specified directory, file filter and file comparator.
171187
*
172-
* @param rootEntry the root directory to observe
173-
* @param fileFilter The file filter or null if none
174-
* @param ioCase what case sensitivity to use comparing file names, null means system sensitive
188+
* @param rootEntry the root directory to observe.
189+
* @param fileFilter The file filter or null if none.
190+
* @param ioCase what case sensitivity to use comparing file names, null means system sensitive.
175191
*/
176192
protected FileAlterationObserver(final FileEntry rootEntry, final FileFilter fileFilter, final IOCase ioCase) {
177193
Objects.requireNonNull(rootEntry, "rootEntry");

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,16 @@ protected void needNewBuffer(final int newCount) {
143143
}
144144

145145
/**
146-
* @see java.io.ByteArrayOutputStream#reset()
146+
* See {@link ByteArrayOutputStream#reset()}.
147+
*
148+
* @see ByteArrayOutputStream#reset()
147149
*/
148150
public abstract void reset();
149151

150152
/**
151-
* @see java.io.ByteArrayOutputStream#reset()
153+
* Implements a default reset behavior.
154+
*
155+
* @see ByteArrayOutputStream#reset()
152156
*/
153157
protected void resetImpl() {
154158
count = 0;

0 commit comments

Comments
 (0)