- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for AsByteSource (0.17 sec)
-
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 = Math.min(dataSize, fileThreshold); int chunk2 = dataSize - chunk1; // Write just enough to not trip the threshold if (chunk1 > 0) { write(out, data, 0, chunk1, singleByte);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 5.5K bytes - Viewed (0) -
android/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); } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 7.4K bytes - Viewed (0) -
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); } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 33.1K 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(Charsets.UTF_8).asByteSource(Charsets.UTF_8)); } public void testToByteArray() throws IOException { File asciiFile = getTestFile("ascii.txt"); File i18nFile = getTestFile("i18n.txt");
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 22.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/FileBackedOutputStream.java
* the {@link ByteSource} returned by {@link #asByteSource} is finalized. * * @param fileThreshold the number of bytes before the stream should switch to buffering to a file * @param resetOnFinalize if true, the {@link #reset} method will be called when the {@link * ByteSource} returned by {@link #asByteSource} is finalized. * @throws IllegalArgumentException if {@code fileThreshold} is negative
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 8.2K 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, Charsets.UTF_8)).asByteSource(Charsets.UTF_8); } @Override public byte[] getExpected(byte[] data) { return factory.getExpected(new String(data, Charsets.UTF_8)).getBytes(Charsets.UTF_8); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Sep 09 17:57:59 GMT 2021 - 17.9K bytes - Viewed (0) -
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();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Jan 29 22:57:05 GMT 2024 - 27.2K bytes - Viewed (0) -
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(Charsets.UTF_8).asByteSource(Charsets.UTF_8)); } public void testToByteArray() throws IOException { File asciiFile = getTestFile("ascii.txt"); File i18nFile = getTestFile("i18n.txt");
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 22.2K 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(
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 13K 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. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 22.4K bytes - Viewed (0)