- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 52 for ByteArrayOutputStream (0.33 sec)
-
android/guava-tests/test/com/google/common/io/ByteSourceTester.java
} public void testCopyTo_outputStream() throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); source.copyTo(out); assertExpectedBytes(out.toByteArray()); } public void testCopyTo_byteSink() throws IOException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); // HERESY! but it's ok just for this I guess source.copyTo(
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 8.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/ReserializingTestCollectionGenerator.java
return reserialize(delegate.create(elements)); } @SuppressWarnings("unchecked") static <T> T reserialize(T object) { try { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bytes); out.writeObject(object); ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Oct 01 17:18:04 GMT 2021 - 2.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MultimapBuilderTest.java
assertEquals(object.getClass(), copy.getClass()); } @J2ktIncompatible @GwtIncompatible // serialization private static Object reserialize(Object object) throws Exception { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); new ObjectOutputStream(bytes).writeObject(object); return new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray())).readObject(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 27 09:26:07 GMT 2024 - 5.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTester.java
} public void testCopyTo_outputStream() throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); source.copyTo(out); assertExpectedBytes(out.toByteArray()); } public void testCopyTo_byteSink() throws IOException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); // HERESY! but it's ok just for this I guess source.copyTo(
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 8.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/Platform.java
final class Platform { /** Serializes and deserializes the specified object. */ @SuppressWarnings("unchecked") static <T> T reserialize(T object) { checkNotNull(object); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); try { ObjectOutputStream out = new ObjectOutputStream(bytes); out.writeObject(object); ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Aug 23 12:13:11 GMT 2023 - 1.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/Platform.java
final class Platform { /** Serializes and deserializes the specified object. */ @SuppressWarnings("unchecked") static <T> T reserialize(T object) { checkNotNull(object); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); try { ObjectOutputStream out = new ObjectOutputStream(bytes); out.writeObject(object); ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Aug 23 12:13:11 GMT 2023 - 1.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
assertThrows(IndexOutOfBoundsException.class, () -> hasher.putBytes(new byte[8], 0, -1)); } private class TestHasher extends AbstractByteHasher { private final ByteArrayOutputStream out = new ByteArrayOutputStream(); @Override protected void update(byte b) { out.write(b); } @Override protected void update(byte[] b, int off, int len) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
public void testOpenBufferedStream() throws IOException { InputStream in = source.openBufferedStream(); assertTrue(source.wasStreamOpened()); assertFalse(source.wasStreamClosed()); ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteStreams.copy(in, out); in.close(); out.close(); assertTrue(source.wasStreamClosed()); assertArrayEquals(bytes, out.toByteArray()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
assertEquals(I18N + I18N + I18N, Files.toString(temp, Charsets.UTF_16LE)); } public void testCopyToOutputStream() throws IOException { File i18nFile = getTestFile("i18n.txt"); ByteArrayOutputStream out = new ByteArrayOutputStream(); Files.copy(i18nFile, out); assertEquals(I18N, out.toString("UTF-8")); } public void testCopyToAppendable() throws IOException { 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-tests/test/com/google/common/hash/HashingOutputStreamTest.java
import com.google.common.testing.NullPointerTester; import java.io.ByteArrayOutputStream; import junit.framework.TestCase; /** * Tests for {@link HashingOutputStream}. * * @author Nick Piepmeier */ public class HashingOutputStreamTest extends TestCase { private Hasher hasher; private HashFunction hashFunction; private final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); @SuppressWarnings("DoNotMock") @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Oct 02 16:24:50 GMT 2020 - 3.1K bytes - Viewed (0)