Returns the size of this source in bytes, 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 file, may return a non-absent value. Note that in such cases, it is <i>possible</i> that th
()
| 179 | * @since 19.0 |
| 180 | */ |
| 181 | public Optional<Long> sizeIfKnown() { |
| 182 | return Optional.absent(); |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Returns the size of this source in bytes, even if doing so requires opening and traversing an |