Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 73 for WriteTo (0.04 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

          return null
        }
    
        val entry = Entry(response)
        var editor: DiskLruCache.Editor? = null
        try {
          editor = cache.edit(key(response.request.url)) ?: return null
          entry.writeTo(editor)
          return RealCacheRequest(editor)
        } catch (_: IOException) {
          abortQuietly(editor)
          return null
        }
      }
    
      @Throws(IOException::class)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

        override fun contentType() = delegate.contentType()
    
        override fun isDuplex() = true
    
        override fun writeTo(sink: BufferedSink) {
          executorService.schedule({
            try {
              delegate.writeTo(sink)
              sink.close()
            } catch (e: IOException) {
              throw RuntimeException(e)
            }
          }, delayMillis, TimeUnit.MILLISECONDS)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  3. src/bufio/bufio_test.go

    	br := NewReader(strings.NewReader("example"))
    	br.WriteTo(io.Discard)
    	if err := br.UnreadRune(); err == nil {
    		t.Error("UnreadRune didn't fail after WriteTo")
    	}
    }
    
    func TestNoUnreadByteAfterWriteTo(t *testing.T) {
    	br := NewReader(strings.NewReader("example"))
    	br.WriteTo(io.Discard)
    	if err := br.UnreadByte(); err == nil {
    		t.Error("UnreadByte didn't fail after WriteTo")
    	}
    }
    
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Feb 07 01:08:54 UTC 2025
    - 51.6K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt

        assertThat(request.body?.contentLength()).isEqualTo(-1L)
        assertThat(request.body?.contentType()).isEqualTo(mediaType)
    
        val requestBodyBytes =
          Buffer()
            .apply {
              request.body?.writeTo(this)
            }
    
        val decompressedRequestBody =
          GzipSource(requestBodyBytes).use {
            it.buffer().readUtf8()
          }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 19K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        setLevel(Level.HEADERS)
        server.enqueue(MockResponse())
        val body: RequestBody =
          object : RequestBody() {
            override fun contentType() = PLAIN
    
            override fun writeTo(sink: BufferedSink) {
              sink.writeUtf8("Hi!")
            }
          }
        val response = client.newCall(request().post(body).build()).execute()
        response.body.close()
        applicationLogs
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 21 14:27:04 UTC 2025
    - 37.5K bytes
    - Viewed (0)
  6. api/go1.25.txt

    pkg runtime/trace, method (*FlightRecorder) Enabled() bool #63185
    pkg runtime/trace, method (*FlightRecorder) Start() error #63185
    pkg runtime/trace, method (*FlightRecorder) Stop() #63185
    pkg runtime/trace, method (*FlightRecorder) WriteTo(io.Writer) (int64, error) #63185
    pkg runtime/trace, type FlightRecorder struct #63185
    pkg runtime/trace, type FlightRecorderConfig struct #63185
    pkg runtime/trace, type FlightRecorderConfig struct, MaxBytes uint64 #63185
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon Jun 02 16:09:57 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt

        object : RequestBody() {
          override fun contentType(): MediaType? = "text/plain".toMediaTypeOrNull()
    
          @Throws(IOException::class)
          override fun writeTo(sink: BufferedSink) {
            try {
              sink.writeUtf8("abc")
              sink.flush()
              Thread.sleep(sleepMillis.toLong())
              sink.writeUtf8("def")
            } catch (e: InterruptedException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt

          override fun contentLength(): Long = original!!.contentLength()
    
          override fun writeTo(sink: BufferedSink) {
            val uppercase = uppercase(sink)
            val bufferedSink = uppercase.buffer()
            original!!.writeTo(bufferedSink)
            bufferedSink.emit()
          }
        }
    
      private fun uppercase(original: BufferedSink): Sink =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

              url = server.url("/"),
              body =
                object : ForwardingRequestBody(transferKind.newRequestBody("def")) {
                  override fun writeTo(sink: BufferedSink) {
                    sinkReference.set(sink)
                    super.writeTo(sink)
                  }
                },
            ),
          )
        assertThat(readAscii(response.body.byteStream(), Int.MAX_VALUE))
          .isEqualTo("abc")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/http/NtlmHttpURLConnection.java

                    connection.connect(); // send type 3
                    if (cachedOutput != null && doOutput) {
                        final OutputStream output = connection.getOutputStream();
                        cachedOutput.writeTo(output);
                        output.flush();
                    }
                    response = parseResponseCode();
                    if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 22.1K bytes
    - Viewed (0)
Back to top