public static class BufferedFileChannelInputStream.Builder extends org.apache.commons.io.build.AbstractStreamBuilder<BufferedFileChannelInputStream,BufferedFileChannelInputStream.Builder>
BufferedFileChannelInputStream instance.
Using File IO:
BufferedFileChannelInputStream s = BufferedFileChannelInputStream.builder()
.setFile(file)
.setBufferSize(4096)
.get();
Using NIO Path:
BufferedFileChannelInputStream s = BufferedFileChannelInputStream.builder()
.setPath(path)
.setBufferSize(4096)
.get();
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
BufferedFileChannelInputStream |
get()
Constructs a new instance.
|
getCharset, setBufferSize, setBufferSize, setCharset, setCharset, setOpenOptionssetByteArray, setCharSequence, setFile, setFile, setInputStream, setOutputStream, setPath, setPath, setReader, setURI, setWriterequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplierpublic BufferedFileChannelInputStream get() throws java.io.IOException
This builder use the aspects Path and buffer size.
You must provide an origin that can be converted to a Path by this builder, otherwise, this call will throw an
UnsupportedOperationException.
java.lang.UnsupportedOperationException - if the origin cannot provide a Path.java.io.IOException - if an I/O error occurs.AbstractOrigin.getPath()Copyright © 2010 - 2023 Adobe. All Rights Reserved