Home | History | Annotate | Download | only in io

Lines Matching defs:source

41  * Generates tests of a all methods on a {@code ByteSource} given various inputs the source is
96 private ByteSource source;
105 source = factory.createSource(data);
109 InputStream in = source.openStream();
119 InputStream in = source.openBufferedStream();
129 byte[] readBytes = source.read();
135 source.copyTo(out);
142 source.copyTo(new ByteSink() {
152 assertEquals(expected.length == 0, source.isEmpty());
156 assertEquals(expected.length, source.size());
160 assertTrue(source.contentEquals(new ByteSource() {
170 byte[] readBytes = source.read(new ByteProcessor<byte[]>() {
190 assertEquals(expectedHash, source.hash(Hashing.md5()));
195 source.slice(-1, 0);
196 fail("expected IllegalArgumentException for call to slice with offset -1: " + source);
201 source.slice(0, -1);
202 fail("expected IllegalArgumentException for call to slice with length -1: " + source);