- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for ByteStreams (0.16 sec)
-
guava/src/com/google/common/io/ByteStreams.java
* * @author Chris Nokleberg * @author Colin Decker * @since 1.0 */ @J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault public final class ByteStreams { private static final int BUFFER_SIZE = 8192; /** Creates a new byte array for buffering reads or writes. */ static byte[] createBuffer() { return new byte[BUFFER_SIZE]; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 29.7K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
package com.google.common.io; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.io.ByteStreams.createBuffer; import static com.google.common.io.ByteStreams.skipUpTo; import static java.lang.Math.min; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Ascii;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
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()); } public void testSize() throws IOException {
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-tests/test/com/google/common/io/ByteSourceTest.java
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()); } public void testSize() throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 15.4K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
import com.google.common.collect.TreeBasedTable; import com.google.common.collect.TreeMultimap; import com.google.common.io.ByteSink; import com.google.common.io.ByteSource; import com.google.common.io.ByteStreams; import com.google.common.io.CharSink; import com.google.common.io.CharSource; import com.google.common.primitives.Primitives; import com.google.common.primitives.UnsignedInteger;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 21.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
import com.google.common.collect.TreeBasedTable; import com.google.common.collect.TreeMultimap; import com.google.common.io.ByteSink; import com.google.common.io.ByteSource; import com.google.common.io.ByteStreams; import com.google.common.io.CharSink; import com.google.common.io.CharSource; import com.google.common.primitives.Primitives; import com.google.common.primitives.UnsignedInteger;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 20.8K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteSink.java
*/ @CanIgnoreReturnValue public long writeFrom(InputStream input) throws IOException { checkNotNull(input); try (OutputStream out = openStream()) { return ByteStreams.copy(input, out); } } /** * A char sink that encodes written characters with a charset and writes resulting bytes to this * byte sink. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 28 16:55:09 UTC 2024 - 5K bytes - Viewed (0) -
guava/src/com/google/common/net/InetAddresses.java
byte[] bytes = ip.getAddress(); Inet4Address server = getInet4Address(Arrays.copyOfRange(bytes, 4, 8)); int flags = ByteStreams.newDataInput(bytes, 8).readShort() & 0xffff; // Teredo obfuscates the mapped client port, per section 4 of the RFC. int port = ~ByteStreams.newDataInput(bytes, 10).readShort() & 0xffff; byte[] clientBytes = Arrays.copyOfRange(bytes, 12, 16);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 47.1K bytes - Viewed (0) -
android/guava/src/com/google/common/net/InetAddresses.java
byte[] bytes = ip.getAddress(); Inet4Address server = getInet4Address(Arrays.copyOfRange(bytes, 4, 8)); int flags = ByteStreams.newDataInput(bytes, 8).readShort() & 0xffff; // Teredo obfuscates the mapped client port, per section 4 of the RFC. int port = ~ByteStreams.newDataInput(bytes, 10).readShort() & 0xffff; byte[] clientBytes = Arrays.copyOfRange(bytes, 12, 16);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 47.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/BaseEncodingTest.java
// See https://github.com/google/guava/issues/3542 Reader reader = new StringReader(cannotDecode); InputStream decodingStream = encoding.decodingStream(reader); try { ByteStreams.exhaust(decodingStream); fail("Expected DecodingException"); } catch (DecodingException expected) { // Don't assert on the expectedMessage; the messages for exceptions thrown from the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 16:27:30 UTC 2024 - 24.6K bytes - Viewed (0)