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 a2ee490e88a2d07978059ac1859d4eb20ef545e2 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri May 19 10:37:18 2023 -0400 Javadoc --- .../apache/commons/io/input/MemoryMappedFileInputStream.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/io/input/MemoryMappedFileInputStream.java b/src/main/java/org/apache/commons/io/input/MemoryMappedFileInputStream.java index 20308a43..1935fa99 100644 --- a/src/main/java/org/apache/commons/io/input/MemoryMappedFileInputStream.java +++ b/src/main/java/org/apache/commons/io/input/MemoryMappedFileInputStream.java @@ -27,6 +27,7 @@ import java.nio.channels.FileChannel.MapMode; import java.nio.file.Path; import java.nio.file.StandardOpenOption; +import org.apache.commons.io.build.AbstractOrigin; import org.apache.commons.io.build.AbstractStreamBuilder; /** @@ -93,8 +94,17 @@ public final class MemoryMappedFileInputStream extends InputStream { /** * Constructs a new instance. + * <p> + * This builder use the aspects Path and buffer size. + * </p> + * <p> + * You must provide an origin that can be converted to a Path by this builder, otherwise, this call will throw an + * {@link UnsupportedOperationException}. + * </p> * - * @throws UnsupportedOperationException if the origin cannot be converted to a Path. + * @return a new instance. + * @throws UnsupportedOperationException if the origin cannot provide a Path. + * @see AbstractOrigin#getPath() */ @Override public MemoryMappedFileInputStream get() throws IOException {