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)
| 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. |
no outgoing calls