MCPcopy Index your code
hub / github.com/antlr/codebuff / wrap

Method wrap

corpus/java/training/guava/io/ByteSource.java:423–425  ·  view source on GitHub ↗

Returns a view of the given byte array as a ByteSource. To view only a specific range in the array, use ByteSource.wrap(b).slice(offset, length). @since 15.0 (since 14.0 as ByteStreams.asByteSource(byte[])).

(byte[] b)

Source from the content-addressed store, hash-verified

421 * @since 15.0 (since 14.0 as {@code ByteStreams.asByteSource(byte[])}).
422 */
423 public static ByteSource wrap(byte[] b) {
424 return new ByteArrayByteSource(b);
425 }
426
427 /**
428 * Returns an immutable {@link ByteSource} that contains no bytes.

Callers 7

growMethod · 0.45
copyMethod · 0.45
putBytesMethod · 0.45
makeHashMethod · 0.45
getCoercedIPv4AddressMethod · 0.45
fromByteArrayMethod · 0.45
fromByteArrayMethod · 0.45

Calls

no outgoing calls

Tested by 1

copyMethod · 0.36