public static class ReaderInputStream.Builder extends AbstractStreamBuilder<ReaderInputStream,ReaderInputStream.Builder>
ReaderInputStream instance.
For example:
ReaderInputStream s = ReaderInputStream.builder()
.setPath(path)
.setCharsetEncoder(Charset.defaultCharset().newEncoder())
.get()
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ReaderInputStream |
get()
Constructs a new instance.
|
ReaderInputStream.Builder |
setCharset(Charset charset)
Sets the Charset.
|
ReaderInputStream.Builder |
setCharsetEncoder(CharsetEncoder charsetEncoder)
Sets the charset encoder.
|
getBufferSize, getBufferSizeDefault, getCharset, getCharsetDefault, setBufferSize, setBufferSize, setBufferSizeDefault, setCharset, setCharsetDefaultcheckOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setReader, setURI, setWriterasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplierpublic Builder()
public ReaderInputStream get() throws IOException
UnsupportedOperationException - if the origin cannot be converted to a Reader.IOException - if an I/O error occurs.public ReaderInputStream.Builder setCharset(Charset charset)
AbstractStreamBuilderSubclasses may ignore this setting.
setCharset in class AbstractStreamBuilder<ReaderInputStream,ReaderInputStream.Builder>charset - the Charset, null resets to the default.public ReaderInputStream.Builder setCharsetEncoder(CharsetEncoder charsetEncoder)
charsetEncoder - the charset encoder.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.