Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for byteStream (0.2 sec)

  1. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response = call.execute()
        interruptLater(500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
          while (responseBody.read(buffer) != -1) {
          }
        }
        responseBody.close()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

        throw new UnsupportedOperationException("readLine is not supported");
      }
    
      @Override
      public void readFully(byte[] b) throws IOException {
        ByteStreams.readFully(this, b);
      }
    
      @Override
      public void readFully(byte[] b, int off, int len) throws IOException {
        ByteStreams.readFully(this, b, off, len);
      }
    
      @Override
      public int skipBytes(int n) throws IOException {
        return (int) in.skip(n);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  5. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 4K bytes
    - Viewed (0)
  6. 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)
  7. android/guava/src/com/google/common/io/ByteArrayDataInput.java

      @Override
      void readFully(byte b[]);
    
      @Override
      void readFully(byte b[], int off, int len);
    
      // not guaranteed to skip n bytes so result should NOT be ignored
      // use ByteStreams.skipFully or one of the read methods instead
      @Override
      int skipBytes(int n);
    
      @CanIgnoreReturnValue // to skip a byte
      @Override
      boolean readBoolean();
    
      @CanIgnoreReturnValue // to skip a byte
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteSink.java

      public long writeFrom(InputStream input) throws IOException {
        checkNotNull(input);
    
        Closer closer = Closer.create();
        try {
          OutputStream out = closer.register(openStream());
          long written = ByteStreams.copy(input, out);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
          return written;
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 5.5K bytes
    - Viewed (0)
Back to top