This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 1d28eef7064c7336d300ae7a0e1bda9987a4b4f1 Author: Gary Gregory <[email protected]> AuthorDate: Fri May 19 10:38:24 2023 -0400 Javadoc --- .../org/apache/commons/io/input/XmlStreamReader.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/io/input/XmlStreamReader.java b/src/main/java/org/apache/commons/io/input/XmlStreamReader.java index 1bf63dc2..251375d9 100644 --- a/src/main/java/org/apache/commons/io/input/XmlStreamReader.java +++ b/src/main/java/org/apache/commons/io/input/XmlStreamReader.java @@ -30,6 +30,7 @@ import java.net.URLConnection; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.nio.file.OpenOption; import java.nio.file.Path; import java.text.MessageFormat; import java.util.Locale; @@ -40,6 +41,7 @@ import java.util.regex.Pattern; import org.apache.commons.io.ByteOrderMark; import org.apache.commons.io.Charsets; import org.apache.commons.io.IOUtils; +import org.apache.commons.io.build.AbstractOrigin; import org.apache.commons.io.build.AbstractStreamBuilder; import org.apache.commons.io.function.IOConsumer; import org.apache.commons.io.output.XmlStreamWriter; @@ -120,8 +122,19 @@ public class XmlStreamReader extends Reader { /** * Constructs a new instance. + * <p> + * This builder use the aspect InputStream, httpContentType, lenient, and defaultEncoding. + * </p> + * <p> + * You must provide an origin that can be converted to an InputStream by this builder, otherwise, this call will throw an + * {@link UnsupportedOperationException}. + * </p> * - * @throws UnsupportedOperationException if the origin cannot be converted to an InputStream. + * @return a new instance. + * @throws UnsupportedOperationException if the origin cannot provide an InputStream. + * @throws IOException thrown if there is a problem reading the stream. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specification. + * @see AbstractOrigin#getInputStream(OpenOption...) */ @SuppressWarnings("resource") @Override @@ -393,7 +406,7 @@ public class XmlStreamReader extends Reader { * @param lenient indicates if the charset encoding detection should be relaxed. * @throws NullPointerException if the input stream is {@code null}. * @throws IOException thrown if there is a problem reading the stream. - * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specification. * @deprecated Use {@link #builder()} and {@link Builder#get()} */ @Deprecated @@ -430,7 +443,7 @@ public class XmlStreamReader extends Reader { * @param defaultEncoding The default encoding * @throws NullPointerException if the input stream is {@code null}. * @throws IOException thrown if there is a problem reading the stream. - * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. + * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specification. * @deprecated Use {@link #builder()} and {@link Builder#get()} */ @Deprecated
