public static class RandomAccessFileInputStream.Builder extends AbstractStreamBuilder<RandomAccessFileInputStream,RandomAccessFileInputStream.Builder>
RandomAccessFileInputStream
instance.
For example:
RandomAccessFileInputStream s = RandomAccessFileInputStream.builder()
.setPath(path)
.setCloseOnClose(true)
.get()
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RandomAccessFileInputStream |
get()
Constructs a new instance.
|
RandomAccessFileInputStream.Builder |
setCloseOnClose(boolean closeOnClose)
Sets whether to close the underlying file when this stream is closed.
|
RandomAccessFileInputStream.Builder |
setRandomAccessFile(RandomAccessFile randomAccessFile)
Sets the RandomAccessFile to stream.
|
getBufferSize, getBufferSizeDefault, getCharset, getCharsetDefault, setBufferSize, setBufferSize, setBufferSizeDefault, setCharset, setCharset, setCharsetDefault
checkOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, 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 RandomAccessFileInputStream get() throws IOException
UnsupportedOperationException
- if the origin cannot be converted to a File.IOException
- if an I/O error occurs.public RandomAccessFileInputStream.Builder setCloseOnClose(boolean closeOnClose)
closeOnClose
- Whether to close the underlying file when this stream is closed.public RandomAccessFileInputStream.Builder setRandomAccessFile(RandomAccessFile randomAccessFile)
randomAccessFile
- the RandomAccessFile to stream.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.