MCPcopy Create free account
hub / github.com/google/guava / asByteSource

Method asByteSource

android/guava/src/com/google/common/io/MoreFiles.java:85–87  ·  view source on GitHub ↗

Returns a view of the given path as a ByteSource. Any plain OpenOption open options provided are used when opening streams to the file and may affect the behavior of the returned source and the streams it provides. See StandardOpenOption for the standard options th

(Path path, OpenOption... options)

Source from the content-addressed store, hash-verified

83 * equivalent to providing the {@link StandardOpenOption#READ READ} option.
84 */
85 public static ByteSource asByteSource(Path path, OpenOption... options) {
86 return new PathByteSource(path, options);
87 }
88
89 @IgnoreJRERequirement // *should* be redundant with the one on MoreFiles itself
90 private static final class PathByteSource extends

Calls

no outgoing calls