Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 3,540 for sink (0.15 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

      private val serverWriter =
        WebSocketWriter(
          isClient = false,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
          minimumDeflateSize = 0L,
        )
      private val clientWriter =
        WebSocketWriter(
          isClient = true,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/FormBody.kt

      override fun contentLength(): Long = writeOrCountBytes(null, true)
    
      @Throws(IOException::class)
      override fun writeTo(sink: BufferedSink) {
        writeOrCountBytes(sink, false)
      }
    
      /**
       * Either writes this request to [sink] or measures its content length. We have one method
       * do double-duty to make sure the counting and content are consistent, particularly when it comes
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/FunnelsTest.java

      public void testAsOutputStream() throws Exception {
        PrimitiveSink sink = mock(PrimitiveSink.class);
        OutputStream out = Funnels.asOutputStream(sink);
        byte[] bytes = {1, 2, 3, 4};
        out.write(255);
        out.write(bytes);
        out.write(bytes, 1, 2);
        verify(sink).putByte((byte) 255);
        verify(sink).putBytes(bytes);
        verify(sink).putBytes(bytes, 1, 2);
      }
    
      public void testSerialization() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

      /**
       * Returns a sink that can be used to write data to the peer.
       *
       * @throws IllegalStateException if this stream was initiated by the peer and a [writeHeaders] has
       *     not yet been sent.
       */
      fun getSink(): Sink {
        this.withLock {
          check(hasResponseHeaders || isLocallyInitiated) {
            "reply before requesting the sink"
          }
        }
        return sink
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/internal/io/FaultyFileSystem.kt

      }
    
      override fun appendingSink(
        file: Path,
        mustExist: Boolean,
      ): Sink = FaultySink(super.appendingSink(file, mustExist), file)
    
      override fun sink(
        file: Path,
        mustCreate: Boolean,
      ): Sink = FaultySink(super.sink(file, mustCreate), file)
    
      inner class FaultySink(sink: Sink, private val file: Path) : ForwardingSink(sink) {
        override fun write(
          source: Buffer,
          byteCount: Long,
        ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/FunnelsTest.java

      public void testAsOutputStream() throws Exception {
        PrimitiveSink sink = mock(PrimitiveSink.class);
        OutputStream out = Funnels.asOutputStream(sink);
        byte[] bytes = {1, 2, 3, 4};
        out.write(255);
        out.write(bytes);
        out.write(bytes, 1, 2);
        verify(sink).putByte((byte) 255);
        verify(sink).putBytes(bytes);
        verify(sink).putBytes(bytes, 1, 2);
      }
    
      public void testSerialization() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

            @Throws(IOException::class)
            override fun writeTo(sink: BufferedSink) {
              delegate().writeTo(uppercaseSink(sink).buffer())
            }
          }
        return request.newBuilder()
          .method(request.method, uppercaseBody)
          .build()
      }
    
      private fun uppercaseSink(sink: Sink): Sink {
        return object : ForwardingSink(sink) {
          @Throws(IOException::class)
          override fun write(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

          }
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<el")
            sink.flush()
            throw IOException("failed to stream the XML")
          }
        }
    
        class ValidRequestBody : RequestBody() {
          override fun contentType(): MediaType {
            return "application/xml".toMediaType()
          }
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<element/>")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/HashTestUtils.java

            long value = random.nextLong();
            for (PrimitiveSink sink : sinks) {
              sink.putLong(value);
            }
          }
        },
        PUT_FLOAT() {
          @Override
          void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
            float value = random.nextFloat();
            for (PrimitiveSink sink : sinks) {
              sink.putFloat(value);
            }
          }
        },
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/CharSink.java

        }
      }
    
      /**
       * Writes all the text from the given {@link Readable} (such as a {@link Reader}) to this sink.
       * Does not close {@code readable} if it is {@code Closeable}.
       *
       * @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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 6.1K bytes
    - Viewed (0)
Back to top