public static class ReaderInputStream.Builder extends AbstractStreamBuilder<ReaderInputStream,ReaderInputStream.Builder>
ReaderInputStream.
For example:
ReaderInputStream s = ReaderInputStream.builder()
.setPath(path)
.setCharsetEncoder(Charset.defaultCharset().newEncoder())
.get();
get()| Constructor and Description |
|---|
Builder()
Constructs a new builder of
ReaderInputStream. |
| Modifier and Type | Method and Description |
|---|---|
ReaderInputStream |
get()
Builds a new
ReaderInputStream. |
ReaderInputStream.Builder |
setCharset(java.nio.charset.Charset charset)
Sets the Charset.
|
ReaderInputStream.Builder |
setCharsetEncoder(java.nio.charset.CharsetEncoder newEncoder)
Sets the charset encoder.
|
getBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getFile, getInputStream, getOpenOptions, getOutputStream, getPath, getRandomAccessFile, getReader, getWriter, setBufferSize, setBufferSize, setBufferSizeChecker, setBufferSizeMax, setCharset, setOpenOptionssetByteArray, setCharSequence, setFile, setFile, setInputStream, setOutputStream, setPath, setPath, setRandomAccessFile, setRandomAccessFile, setReader, setURI, setWriterequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplier, getUncheckedpublic Builder()
ReaderInputStream.public ReaderInputStream get() throws java.io.IOException
ReaderInputStream.
You must set an aspect that supports AbstractStreamBuilder.getReader(), otherwise, this method throws an exception.
This builder uses the following aspects:
AbstractStreamBuilder.getReader() gets the target aspect.AbstractStreamBuilder.getBufferSize()AbstractStreamBuilder.getCharset()CharsetEncoderjava.lang.UnsupportedOperationException - if the origin cannot provide a Reader.java.lang.IllegalStateException - if the origin is null.java.io.IOException - if an I/O error occurs converting to a Reader using AbstractStreamBuilder.getReader().AbstractStreamBuilder.getReader(),
CharsetEncoder,
AbstractStreamBuilder.getBufferSize(),
IOSupplier.getUnchecked()public ReaderInputStream.Builder setCharset(java.nio.charset.Charset charset)
AbstractStreamBuilderSubclasses may ignore this setting.
setCharset in class AbstractStreamBuilder<ReaderInputStream,ReaderInputStream.Builder>charset - the Charset, null resets to the default.this instance.public ReaderInputStream.Builder setCharsetEncoder(java.nio.charset.CharsetEncoder newEncoder)
newEncoder - the charset encoder, null resets to a default encoder.this instance.Copyright © 2010 - 2025 Adobe. All Rights Reserved