- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 35 for ByteSource (0.12 sec)
-
guava/src/com/google/common/io/package-info.java
* the License. */ /** * Utility methods and classes for I/O; for example input streams, output streams, readers, writers, * and files. * * <p>At the core of this package are the Source/Sink types: {@link ByteSource ByteSource}, {@link * CharSource CharSource}, {@link ByteSink ByteSink} and {@link CharSink CharSink}. They are * factories for I/O streams that provide many convenience methods that handle both opening and * closing streams for you.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 23 19:57:03 UTC 2023 - 1.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
@Override public void tearDown() throws IOException {} } private static class ByteArraySourceFactory implements ByteSourceFactory { @Override public ByteSource createSource(byte[] bytes) throws IOException { return ByteSource.wrap(bytes); } @Override public byte[] getExpected(byte[] bytes) { return bytes; } @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) -
guava/src/com/google/common/io/Resources.java
private Resources() {} /** * Returns a {@link ByteSource} that reads from the given URL. * * @since 14.0 */ public static ByteSource asByteSource(URL url) { return new UrlByteSource(url); } /** A byte source that reads from a URL using {@link URL#openStream()}. */ private static final class UrlByteSource extends ByteSource { private final URL url;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 13:50:22 UTC 2024 - 7.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
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); assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source)); } File file = out.getFile();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 5.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/SourceSinkFactory.java
S createSink() throws IOException; /** Gets the current content of the created sink. */ T getSinkContents() throws IOException; } /** Factory for {@link ByteSource} instances. */ public interface ByteSourceFactory extends SourceFactory<ByteSource, byte[]> {} /** Factory for {@link ByteSink} instances. */ public interface ByteSinkFactory extends SinkFactory<ByteSink, byte[]> {}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3K bytes - Viewed (0) -
guava/src/com/google/common/io/CharSource.java
* be an empty line at the end if the contents are terminated with a line separator. * * <p>Any {@link ByteSource} containing text encoded with a specific {@linkplain Charset character * encoding} may be viewed as a {@code CharSource} using {@link ByteSource#asCharSource(Charset)}. * * <p><b>Note:</b> In general, {@code CharSource} is intended to be used for "file-like" sources
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/src/com/google/common/io/package-info.java
* the License. */ /** * Utility methods and classes for I/O; for example input streams, output streams, readers, writers, * and files. * * <p>At the core of this package are the Source/Sink types: {@link ByteSource ByteSource}, {@link * CharSource CharSource}, {@link ByteSink ByteSink} and {@link CharSink CharSink}. They are * factories for I/O streams that provide many convenience methods that handle both opening and * closing streams for you.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 23 19:57:03 UTC 2023 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/MultiInputStream.java
@ElementTypesAreNonnullByDefault final class MultiInputStream extends InputStream { private Iterator<? extends ByteSource> it; @CheckForNull private InputStream in; /** * Creates a new instance. * * @param it an iterator of I/O suppliers that will provide each substream */ public MultiInputStream(Iterator<? extends ByteSource> it) throws IOException { this.it = checkNotNull(it); advance(); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 28 20:13:02 UTC 2023 - 2.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/MoreFilesTest.java
public void testByteSource_size_ofDirectory() throws IOException { try (FileSystem fs = Jimfs.newFileSystem(Configuration.unix())) { Path dir = fs.getPath("dir"); Files.createDirectory(dir); ByteSource source = MoreFiles.asByteSource(dir); assertThat(source.sizeIfKnown()).isAbsent(); assertThrows(IOException.class, () -> source.size()); } }
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/FilesTest.java
suite.addTestSuite(FilesTest.class); 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");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 22.1K bytes - Viewed (0)