HomeSort by relevance Sort by last modified time
    Searched refs:ByteSource (Results 1 - 25 of 117) sorted by null

1 2 3 4 5

  /tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/utils/
CloseableByteSource.java 19 import com.google.common.io.ByteSource;
29 public abstract class CloseableByteSource extends ByteSource implements Closeable {
ByteTracker.java 19 import com.google.common.io.ByteSource;
51 return new CloseableDelegateByteSource(ByteSource.wrap(data), data.length) {
71 return new CloseableDelegateByteSource(ByteSource.wrap(data), data.length) {
87 public CloseableDelegateByteSource fromSource(@Nonnull ByteSource source) throws IOException {
CloseableDelegateByteSource.java 23 import com.google.common.io.ByteSource;
41 private ByteSource inner;
56 public CloseableDelegateByteSource(@Nonnull ByteSource inner, long size) {
68 private synchronized ByteSource get() {
109 public ByteSource slice(long offset, long length) {
149 public boolean contentEquals(@Nonnull ByteSource other) throws IOException {
  /external/guava/guava-tests/test/com/google/common/io/
MultiInputStreamTest.java 49 final ByteSource source = newByteSource(0, 50);
51 ByteSource checker = new ByteSource() {
65 byte[] result = ByteSource.concat(checker, checker, checker).read();
70 List<ByteSource> sources = Lists.newArrayList();
76 ByteSource joined = ByteSource.concat(sources);
81 ByteSource source = newByteSource(0, 10);
82 ByteSource joined = ByteSource.concat(source, source)
    [all...]
ByteSourceTest.java 45 * Tests for the default implementations of {@code ByteSource} methods.
53 suite.addTest(ByteSourceTester.tests("ByteSource.wrap[byte[]]",
55 suite.addTest(ByteSourceTester.tests("ByteSource.empty[]",
167 ByteSource byteSource = new TestByteSource("hamburger\n".getBytes(Charsets.US_ASCII));
170 assertEquals("cfa0c5002275c90508338a5cdb2a9781", byteSource.hash(Hashing.md5()).toString());
177 ByteSource equalSource = new TestByteSource(bytes);
181 ByteSource fewerBytes = new TestByteSource(newPreFilledByteArray(bytes.length / 2));
186 ByteSource oneByteOff = new TestByteSource(copy);
222 * @param offset the first argument to {@link ByteSource#slice
    [all...]
SourceSinkFactory.java 79 * Factory for {@link ByteSource} instances.
81 public interface ByteSourceFactory extends SourceFactory<ByteSource, byte[]> {
FileBackedOutputStreamTest.java 81 ByteSource source = out.asByteSource();
88 assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source));
130 ByteSource source = out.asByteSource();
151 ByteSource source = out.asByteSource();
TestByteSource.java 33 public final class TestByteSource extends ByteSource implements TestStreamSupplier {
SourceSinkFactories.java 159 public ByteSource createSource(byte[] bytes) throws IOException {
196 public ByteSource createSource(byte[] bytes) throws IOException {
197 return ByteSource.wrap(bytes);
230 public ByteSource createSource(byte[] bytes) throws IOException {
231 return ByteSource.empty();
271 public ByteSource createSource(byte[] bytes) throws IOException {
408 public ByteSource createSource(byte[] bytes) throws IOException {
ByteSourceTester.java 40 * A generator of {@code TestSuite} instances for testing {@code ByteSource} implementations.
41 * Generates tests of a all methods on a {@code ByteSource} given various inputs the source is
47 public class ByteSourceTester extends SourceSinkTester<ByteSource, byte[], ByteSourceFactory> {
82 // test a random slice() of the ByteSource
96 private ByteSource source;
160 assertTrue(source.contentEquals(new ByteSource() {
  /external/protobuf/src/google/protobuf/stubs/
bytestream.h 31 // This file declares the ByteSink and ByteSource abstract interfaces. These
32 // interfaces represent objects that consume (ByteSink) or produce (ByteSource)
46 // ByteSource:
99 // ByteSource* source = ...
106 class LIBPROTOBUF_EXPORT ByteSource {
108 ByteSource() {}
109 virtual ~ByteSource() {}
113 // increase. Available() returning 0 indicates that the ByteSource is
117 // indicative of the fixed-size nature of a ByteSource.
135 // Writes the next n bytes in this ByteSource to the given ByteSink, an
    [all...]
bytestream.cc 40 void ByteSource::CopyTo(ByteSink* sink, size_t n) {
44 GOOGLE_LOG(DFATAL) << "ByteSource::CopyTo() overran input.";
159 LimitByteSource::LimitByteSource(ByteSource *source, size_t limit)
bytestream_unittest.cc 45 // We use this class instead of ArrayByteSource to simulate a ByteSource that
48 class MockByteSource : public ByteSource {
  /prebuilts/tools/darwin-x86_64/protoc/include/google/protobuf/stubs/
bytestream.h 31 // This file declares the ByteSink and ByteSource abstract interfaces. These
32 // interfaces represent objects that consume (ByteSink) or produce (ByteSource)
46 // ByteSource:
99 // ByteSource* source = ...
106 class LIBPROTOBUF_EXPORT ByteSource {
108 ByteSource() {}
109 virtual ~ByteSource() {}
113 // increase. Available() returning 0 indicates that the ByteSource is
117 // indicative of the fixed-size nature of a ByteSource.
135 // Writes the next n bytes in this ByteSource to the given ByteSink, an
    [all...]
  /external/guava/guava/src/com/google/common/io/
ByteSource.java 43 * {@code ByteSource} is not an open, stateful stream for input that can be read and closed.
46 * <p>{@code ByteSource} provides two kinds of methods:
59 public abstract class ByteSource {
66 protected ByteSource() {}
111 public ByteSource slice(long offset, long length) {
308 public boolean contentEquals(ByteSource other) throws IOException {
335 * Concatenates multiple {@link ByteSource} instances into a single source. Streams returned from
342 * @return a {@code ByteSource} containing the concatenated data
345 public static ByteSource concat(Iterable<? extends ByteSource> sources)
    [all...]
FileBackedOutputStream.java 45 private final ByteSource source;
69 * not reset the data when the {@link ByteSource} returned by
81 * optionally resets the data when the {@link ByteSource} returned
87 * be called when the {@link ByteSource} returned by {@link
97 source = new ByteSource() {
112 source = new ByteSource() {
122 * Returns a readable {@link ByteSource} view of the data that has been
127 public ByteSource asByteSource() {
MultiInputStream.java 36 private Iterator<? extends ByteSource> it;
45 Iterator<? extends ByteSource> it) throws IOException {
Resources.java 51 * Returns a {@link ByteSource} that reads from the given URL.
55 public static ByteSource asByteSource(URL url) {
62 private static final class UrlByteSource extends ByteSource {
  /external/protobuf/src/google/protobuf/util/internal/
json_escaping.h 79 // Escape the given ByteSource to the given ByteSink.
80 static void Escape(strings::ByteSource* input, strings::ByteSink* output);
  /external/caliper/caliper/src/main/java/com/google/caliper/config/
CaliperConfigLoader.java 25 import com.google.common.io.ByteSource;
67 ByteSource supplier = Util.resourceSupplier(CaliperConfig.class, "default-config.properties");
89 private static void tryCopyIfNeeded(ByteSource supplier, File rcFile) {
  /tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
LazyDelegateByteSource.java 24 import com.google.common.io.ByteSource;
35 * {@code ByteSource} that delegates all operations to another {@code ByteSource}. The other
99 public ByteSource slice(long offset, long length) {
143 public boolean contentEquals(@Nonnull ByteSource other) throws IOException {
  /tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/utils/
ApkZFileTestUtils.java 24 import com.google.common.io.ByteSource;
91 public static ByteSource getResourceBytes(@Nonnull String path) {
  /external/caliper/caliper/src/main/java/com/google/caliper/util/
Util.java 23 import com.google.common.io.ByteSource;
69 public static ImmutableMap<String, String> loadProperties(ByteSource is) throws IOException {
81 public static ByteSource resourceSupplier(final Class<?> c, final String name) {
  /external/tensorflow/tensorflow/core/distributed_runtime/rpc/
grpc_util.cc 109 struct ByteSource : public TensorResponse::Source {
119 ByteSource bs;
  /external/guava/guava-testlib/src/com/google/common/testing/
ArbitraryInstances.java 72 import com.google.common.io.ByteSource;
232 .put(ByteSource.class, ByteSource.empty())

Completed in 224 milliseconds

1 2 3 4 5