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