public static class MemoryMappedFileInputStream.Builder extends AbstractStreamBuilder<MemoryMappedFileInputStream,MemoryMappedFileInputStream.Builder>
MemoryMappedFileInputStream
instance.
For example:
MemoryMappedFileInputStream s = MemoryMappedFileInputStream.builder()
.setPath(path)
.setBufferSize(256 * 1024)
.get();
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MemoryMappedFileInputStream |
get()
Constructs a new instance.
|
getBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getInputStream, getOpenOptions, getOutputStream, getPath, getWriter, setBufferSize, setBufferSize, setBufferSizeDefault, setCharset, setCharset, setCharsetDefault, setOpenOptions
checkOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setReader, setURI, setWriter
asThis
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asSupplier
public Builder()
public MemoryMappedFileInputStream get() throws 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
.
UnsupportedOperationException
- if the origin cannot provide a Path.IOException
- if an I/O error occurs.AbstractOrigin.getPath()
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.