MCPcopy
hub / github.com/google/guava / sizeIfKnown

Method sizeIfKnown

guava/src/com/google/common/io/ByteSource.java:181–183  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 12

equalMethod · 0.95
isEmptyMethod · 0.95
sizeMethod · 0.95
readMethod · 0.95
sizeIfKnownMethod · 0.45
sizeIfKnownMethod · 0.45
readMethod · 0.45
testSizeIfKnownMethod · 0.45

Calls 1

absentMethod · 0.95