- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for writeFrom (0.14 sec)
-
android/guava-tests/test/com/google/common/io/CharSinkTest.java
StringReader reader = new StringReader(STRING); sink.writeFrom(reader); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertEquals(STRING, sink.getString()); } public void testWriteFromStream_doesNotCloseThatStream() throws IOException { TestReader in = new TestReader(); assertFalse(in.closed()); sink.writeFrom(in); assertFalse(in.closed()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 4.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSinkTest.java
sink.writeFrom(in); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertArrayEquals(bytes, sink.getBytes()); } public void testWriteFromStream_doesNotCloseThatStream() throws IOException { TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10])); assertFalse(in.closed()); sink.writeFrom(in); assertFalse(in.closed()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSinkTest.java
sink.writeFrom(in); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertArrayEquals(bytes, sink.getBytes()); } public void testWriteFromStream_doesNotCloseThatStream() throws IOException { TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10])); assertFalse(in.closed()); sink.writeFrom(in); assertFalse(in.closed()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteSink.java
* input}. * * @return the number of bytes written * @throws IOException if an I/O occurs while reading from {@code input} or writing to this sink */ @CanIgnoreReturnValue public long writeFrom(InputStream input) throws IOException { checkNotNull(input); try (OutputStream out = openStream()) { return ByteStreams.copy(input, out); } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 28 16:55:09 UTC 2024 - 5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSinkTester.java
} public void testWrite() throws IOException { sink.write(data); assertContainsExpectedBytes(); } public void testWriteFrom_inputStream() throws IOException { sink.writeFrom(new ByteArrayInputStream(data)); assertContainsExpectedBytes(); } private void assertContainsExpectedBytes() throws IOException { assertArrayEquals(expected, factory.getSinkContents()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSinkTester.java
} public void testWrite() throws IOException { sink.write(data); assertContainsExpectedBytes(); } public void testWriteFrom_inputStream() throws IOException { sink.writeFrom(new ByteArrayInputStream(data)); assertContainsExpectedBytes(); } private void assertContainsExpectedBytes() throws IOException { assertArrayEquals(expected, factory.getSinkContents()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSink.java
* * @return the number of characters written * @throws IOException if an I/O error occurs while reading from {@code readable} or writing to * this sink */ @CanIgnoreReturnValue public long writeFrom(Readable readable) throws IOException { checkNotNull(readable); try (Writer out = openStream()) { return CharStreams.copy(readable, out); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 6.8K bytes - Viewed (0)