MCPcopy Create free account
hub / github.com/antlr/codebuff / sizeIfKnown

Method sizeIfKnown

corpus/java/training/guava/io/ByteSource.java:168–171  ·  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. The default implementation returns Optional#absent. Some sources, such as a file, may return a non-absent value. Note that in such cases, it is possible that th

()

Source from the content-addressed store, hash-verified

166 * @since 19.0
167 */
168 @Beta
169 public Optional<Long> sizeIfKnown() {
170 return Optional.absent();
171 }
172
173 /**
174 * Returns the size of this source in bytes, even if doing so requires opening and traversing an

Callers 4

isEmptyMethod · 0.95
sizeMethod · 0.95
sizeIfKnownMethod · 0.45
sizeIfKnownMethod · 0.45

Calls 1

absentMethod · 0.95

Tested by

no test coverage detected