Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for byteStream (0.22 sec)

  1. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

        InputStream in = source.openStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
    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)
  2. 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
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Aug 25 16:34:08 GMT 2022
    - 24.6K bytes
    - Viewed (0)
  3. android/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];
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/ByteSinkTester.java

        OutputStream out = sink.openStream();
        try {
          ByteStreams.copy(new ByteArrayInputStream(data), out);
        } finally {
          out.close();
        }
    
        assertContainsExpectedBytes();
      }
    
      public void testOpenBufferedStream() throws IOException {
        OutputStream out = sink.openBufferedStream();
        try {
          ByteStreams.copy(new ByteArrayInputStream(data), out);
        } finally {
          out.close();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/ByteSourceTester.java

        InputStream in = source.openStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
    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)
  6. 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 {
    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)
  7. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

            NullPointerException.class, () -> ByteStreams.readFully(newTestStream(10), null, 0, 10));
    
        assertThrows(NullPointerException.class, () -> ByteStreams.readFully(null, b, 0, 10));
    
        assertThrows(
            IndexOutOfBoundsException.class, () -> ByteStreams.readFully(newTestStream(10), b, -1, 10));
    
        assertThrows(
            IndexOutOfBoundsException.class, () -> ByteStreams.readFully(newTestStream(10), b, 0, -1));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  8. 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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 24.6K bytes
    - Viewed (0)
  9. 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 com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Ascii;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  10. 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 {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
Back to top