- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 61 for openStream (0.1 sec)
-
guava-tests/test/com/google/common/io/TestCharSource.java
} @Override public boolean wasStreamClosed() { return byteSource.wasStreamClosed(); } @Override public Reader openStream() throws IOException { return new InputStreamReader(byteSource.openStream(), UTF_8); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 1.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTester.java
} @Override public void setUp() throws IOException { source = factory.createSource(data); } public void testOpenStream() throws IOException { InputStream in = source.openStream(); try { byte[] readBytes = ByteStreams.toByteArray(in); assertExpectedBytes(readBytes); } finally { in.close(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.6K bytes - Viewed (0) -
guava/src/com/google/common/io/Resources.java
} /** A byte source that reads from a URL using {@link URL#openStream()}. */ private static final class UrlByteSource extends ByteSource { private final URL url; private UrlByteSource(URL url) { this.url = checkNotNull(url); } @Override public InputStream openStream() throws IOException { return url.openStream(); } @Override public String toString() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 13:50:22 UTC 2024 - 7.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ResourceTraversalTest.java
final URL classURL = ResourceUtil.getResource(classFilePath); final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL(); ResourceTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ResourceHandler) (path, is) -> { try { if (count < 10) { System.out.println(path); } assertThat(path, is(notNullValue()));
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
@Override String read(ByteSource byteSource, Charset cs) throws IOException { StringBuilder sb = new StringBuilder(); try (InputStreamReader reader = new InputStreamReader(byteSource.openStream(), cs)) { CharStreams.copy(reader, sb); } return sb.toString(); } }, // It really seems like this should be faster than TO_BYTE_ARRAY_NEW_STRING. But it just isn't
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 5.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
// Slice it starting at offset 10. ByteSource slice = source.slice(10, 5); // Open a stream to the slice. InputStream in = slice.openStream(); // Append 10 more bytes to the source. source.append(newPreFilledByteArray(5, 10)); // The stream reports no bytes... importantly, it doesn't read the byte at index 5 when it
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 15.4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/MultiReader.java
advance(); } /** Closes the current reader and opens the next one, if any. */ private void advance() throws IOException { close(); if (it.hasNext()) { current = it.next().openStream(); } } @Override public int read(char[] cbuf, int off, int len) throws IOException { checkNotNull(cbuf); if (current == null) { return -1; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 28 20:13:02 UTC 2023 - 2.4K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ClassTraversalTest.java
final URL classURL = ResourceUtil.getResource(classFilePath); final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL(); ClassTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ClassHandler) (packageName, shortClassName) -> { if (count < 10) { System.out.println(ClassUtil.concatName(packageName, shortClassName)); }
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 5.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/TestByteSink.java
public boolean wasStreamOpened() { return outputStreamOpened; } @Override public boolean wasStreamClosed() { return outputStreamClosed; } @Override public OutputStream openStream() throws IOException { outputStreamOpened = true; bytes.reset(); // truncate return new Out(); } private final class Out extends TestOutputStream { public Out() throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Sep 15 13:47:32 UTC 2016 - 1.8K bytes - Viewed (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/PathSource.java
this.location = location != null ? location : this.path.toString(); } @Override public Path getPath() { return path; } @Override public InputStream openStream() throws IOException { return Files.newInputStream(path); } @Override public String getLocation() { return location; } @Override
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Wed Sep 18 11:42:07 UTC 2024 - 2.5K bytes - Viewed (0)