- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for AsByteSource (0.07 sec)
-
android/guava/src/com/google/common/io/Files.java
* @since 12.0 * @deprecated Prefer {@code asByteSource(file).hash(hashFunction)}. */ @Deprecated @InlineMe( replacement = "Files.asByteSource(file).hash(hashFunction)", imports = "com.google.common.io.Files") public static HashCode hash(File file, HashFunction hashFunction) throws IOException { return asByteSource(file).hash(hashFunction); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 32.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
return suite; } public void testRoundTripSources() throws Exception { File asciiFile = getTestFile("ascii.txt"); ByteSource byteSource = Files.asByteSource(asciiFile); assertSame(byteSource, byteSource.asCharSource(UTF_8).asByteSource(UTF_8)); } public void testToByteArray() throws IOException { File asciiFile = getTestFile("ascii.txt"); File i18nFile = getTestFile("i18n.txt");
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 22.1K bytes - Viewed (0) -
guava/src/com/google/common/io/Resources.java
} @Override public String toString() { return "Resources.asByteSource(" + url + ")"; } } /** * Returns a {@link CharSource} that reads from the given URL using the given character set. * * @since 14.0 */ public static CharSource asCharSource(URL url, Charset charset) { return asByteSource(url).asCharSource(charset); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 7.4K bytes - Viewed (0) -
android/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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 5.6K bytes - Viewed (0) -
guava/src/com/google/common/io/Files.java
* @since 12.0 * @deprecated Prefer {@code asByteSource(file).hash(hashFunction)}. */ @Deprecated @InlineMe( replacement = "Files.asByteSource(file).hash(hashFunction)", imports = "com.google.common.io.Files") public static HashCode hash(File file, HashFunction hashFunction) throws IOException { return asByteSource(file).hash(hashFunction); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 32.9K bytes - Viewed (0) -
android/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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 25.7K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 25.3K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 5.6K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 11.5K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 17.9K bytes - Viewed (0)