Returns the size of this source in chars, if the size can be easily determined without actually opening the data stream. <p>The default implementation returns {@link Optional#absent}. Some sources, such as a {@code CharSequence}, may return a non-absent value. Note that in such cases, it is <i>poss
()
| 188 | * @since 19.0 |
| 189 | */ |
| 190 | public Optional<Long> lengthIfKnown() { |
| 191 | return Optional.absent(); |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * Returns the length of this source in chars, even if doing so requires opening and traversing an |