- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for asByteSource (0.12 sec)
-
guava-tests/test/com/google/common/io/MoreFilesTest.java
assertThat(MoreFiles.equal(fooPath, barPath)).isFalse(); assertThat(MoreFiles.equal(fooPath, fooPath)).isTrue(); assertThat(MoreFiles.asByteSource(fooPath).contentEquals(MoreFiles.asByteSource(fooPath))) .isTrue(); Path fooCopy = Files.copy(fooPath, fs.getPath("fooCopy")); assertThat(Files.isSameFile(fooPath, fooCopy)).isFalse();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 27.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MoreFilesTest.java
assertThat(MoreFiles.equal(fooPath, barPath)).isFalse(); assertThat(MoreFiles.equal(fooPath, fooPath)).isTrue(); assertThat(MoreFiles.asByteSource(fooPath).contentEquals(MoreFiles.asByteSource(fooPath))) .isTrue(); Path fooCopy = Files.copy(fooPath, fs.getPath("fooCopy")); assertThat(Files.isSameFile(fooPath, fooCopy)).isFalse();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 16:07:00 UTC 2024 - 26.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
throws IOException { byte[] data = newPreFilledByteArray(dataSize); FileBackedOutputStream out = new FileBackedOutputStream(fileThreshold, resetOnFinalize); ByteSource source = out.asByteSource(); int chunk1 = min(dataSize, fileThreshold); int chunk2 = dataSize - chunk1; // Write just enough to not trip the threshold if (chunk1 > 0) { write(out, data, 0, chunk1, singleByte);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 5.5K bytes - Viewed (0) -
guava/src/com/google/common/io/CharSource.java
* returned, rather than round-trip encoding. Subclasses that override this method should behave * the same way. * * @since 20.0 */ public ByteSource asByteSource(Charset charset) { return new AsByteSource(charset); } /** * Opens a new {@link Reader} for reading from this source. This method returns a new, independent * reader each time it is called. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 25.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/SourceSinkFactories.java
checkNotNull(factory); return new ByteSourceFactory() { @Override public ByteSource createSource(byte[] data) throws IOException { return factory.createSource(new String(data, UTF_8)).asByteSource(UTF_8); } @Override public byte[] getExpected(byte[] data) { return factory.getExpected(new String(data, UTF_8)).getBytes(UTF_8); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 12.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
checkNotNull(factory); return new ByteSourceFactory() { @Override public ByteSource createSource(byte[] data) throws IOException { return factory.createSource(new String(data, UTF_8)).asByteSource(UTF_8); } @Override public byte[] getExpected(byte[] data) { return factory.getExpected(new String(data, UTF_8)).getBytes(UTF_8); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 17.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSourceTest.java
public static TestSuite suite() { TestSuite suite = new TestSuite(); for (boolean asByteSource : new boolean[] {false, true}) { suite.addTest( CharSourceTester.tests( "CharSource.wrap[CharSequence]", SourceSinkFactories.stringCharSourceFactory(), asByteSource)); suite.addTest( CharSourceTester.tests(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 11.4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
AsCharSource(Charset charset) { this.charset = checkNotNull(charset); } @Override public ByteSource asByteSource(Charset charset) { if (charset.equals(this.charset)) { return ByteSource.this; } return super.asByteSource(charset); } @Override public Reader openStream() throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/MoreFiles.java
* entities such as devices or pipes, in which case we must fall back on comparing the bytes * directly. */ ByteSource source1 = asByteSource(path1); ByteSource source2 = asByteSource(path2); long len1 = source1.sizeIfKnown().or(0L); long len2 = source2.sizeIfKnown().or(0L); if (len1 != 0 && len2 != 0 && len1 != len2) { return false; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 16:07:00 UTC 2024 - 35K bytes - Viewed (0) -
guava/src/com/google/common/io/MoreFiles.java
* entities such as devices or pipes, in which case we must fall back on comparing the bytes * directly. */ ByteSource source1 = asByteSource(path1); ByteSource source2 = asByteSource(path2); long len1 = source1.sizeIfKnown().or(0L); long len2 = source2.sizeIfKnown().or(0L); if (len1 != 0 && len2 != 0 && len1 != len2) { return false; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 16:07:00 UTC 2024 - 34.5K bytes - Viewed (0)