You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/05/19 14:39:49 UTC
[commons-io] 05/24: Javadoc
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 06c39695bbc9aa329dd4efdd456d360a5d4ac466
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri May 19 10:37:43 2023 -0400
Javadoc
---
.../org/apache/commons/io/input/ReadAheadInputStream.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java b/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
index f866312a..bad740c3 100644
--- a/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
+import java.nio.file.OpenOption;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -30,6 +31,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
+import org.apache.commons.io.build.AbstractOrigin;
import org.apache.commons.io.build.AbstractStreamBuilder;
/**
@@ -68,8 +70,17 @@ public class ReadAheadInputStream extends FilterInputStream {
/**
* Constructs a new instance.
+ * <p>
+ * This builder use the aspects InputStream, buffer size, ExecutorService.
+ * </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.
+ * @see AbstractOrigin#getInputStream(OpenOption...)
*/
@SuppressWarnings("resource")
@Override