T - The subclass.abstract static class BoundedInputStream.AbstractBuilder<T extends BoundedInputStream.AbstractBuilder<T>> extends AbstractStreamBuilder<BoundedInputStream,T>
BoundedInputStream subclassses.| Modifier and Type | Field and Description |
|---|---|
private long |
count
The current count of bytes counted.
|
private long |
maxCount
The max count of bytes to read.
|
private boolean |
propagateClose
Flag if
BoundedInputStream.close() should be propagated, true by default. |
| Constructor and Description |
|---|
AbstractBuilder() |
| Modifier and Type | Method and Description |
|---|---|
(package private) long |
getCount() |
(package private) long |
getMaxCount() |
(package private) boolean |
isPropagateClose() |
T |
setCount(long count)
Sets the current number of bytes counted.
|
T |
setMaxCount(long maxCount)
Sets the maximum number of bytes to return.
|
T |
setPropagateClose(boolean propagateClose)
Sets whether the
BoundedInputStream.close() method should propagate to the underling InputStream. |
getBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getInputStream, getOpenOptions, getOutputStream, getPath, getReader, getWriter, setBufferSize, setBufferSize, setBufferSizeChecker, setBufferSizeDefault, setBufferSizeMax, 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, waitasSupplier, getprivate long count
private long maxCount
private boolean propagateClose
BoundedInputStream.close() should be propagated, true by default.long getCount()
long getMaxCount()
boolean isPropagateClose()
public T setCount(long count)
Useful when building from another stream to carry forward a read count.
Default is 0, negative means 0.
count - The current number of bytes counted.public T setMaxCount(long maxCount)
Default is , negative means unbound.
maxCount - The maximum number of bytes to return.public T setPropagateClose(boolean propagateClose)
BoundedInputStream.close() method should propagate to the underling InputStream.
Default is true.
propagateClose - true if calling BoundedInputStream.close() propagates to the close() method of the underlying stream or false if
it does not.