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). Note that the given byte array may be passed directly to methods on, for example, OutputStream (when {@code copyTo(OutputStrea
(byte[] b)
| 425 | * @since 15.0 (since 14.0 as {@code ByteStreams.asByteSource(byte[])}). |
| 426 | */ |
| 427 | public static ByteSource wrap(byte[] b) { |
| 428 | return new ByteArrayByteSource(b); |
| 429 | } |
| 430 | |
| 431 | /** |
| 432 | * Returns an immutable {@link ByteSource} that contains no bytes. |
no outgoing calls