public static class UnsynchronizedBufferedInputStream.Builder extends 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.
|
getBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getInputStream, getOpenOptions, getOutputStream, getPath, getWriter, setBufferSize, setBufferSize, setBufferSizeDefault, setCharset, setCharset, setCharsetDefault, setOpenOptionscheckOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setReader, setURI, setWriterasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplierpublic Builder()
public UnsynchronizedBufferedInputStream get() throws 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.
UnsupportedOperationException - if the origin cannot provide an InputStream.IOException - if an I/O error occurs.AbstractStreamBuilder.getInputStream()Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.