Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 146 for sina (0.01 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/okio/LoggingFilesystem.kt

      override fun delete(
        path: Path,
        mustExist: Boolean,
      ) {
        log("delete($path)")
    
        super.delete(path, mustExist)
      }
    
      override fun sink(
        path: Path,
        mustCreate: Boolean,
      ): Sink {
        log("sink($path)")
    
        return super.sink(path, mustCreate)
      }
    
      override fun source(file: Path): Source {
        log("source($file)")
    
        return super.source(file)
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt

         * reader lock and return the new bytes.
         *
         * ## The file
         *
         * In this case we copy bytes from the file to the [sink].
         *
         * ## The buffer
         *
         * In this case the bytes are immediately copied into [sink] and the number of bytes copied is
         * returned.
         *
         * If upstream would be selected but another thread is already reading upstream this will
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 17:15:47 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/FaultHidingSink.kt

     */
    package okhttp3.internal.cache
    
    import java.io.IOException
    import okio.Buffer
    import okio.ForwardingSink
    import okio.Sink
    
    /** A sink that never throws IOExceptions, even if the underlying sink does. */
    internal open class FaultHidingSink(
      delegate: Sink,
      val onException: (IOException) -> Unit,
    ) : ForwardingSink(delegate) {
      private var hasErrors = false
    
      override fun write(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt

          override fun writeTo(sink: BufferedSink) {
            val uppercase = uppercase(sink)
            val bufferedSink = uppercase.buffer()
            original!!.writeTo(bufferedSink)
            bufferedSink.emit()
          }
        }
    
      private fun uppercase(original: BufferedSink): Sink =
        object : ForwardingSink(original) {
          override fun write(
            source: Buffer,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt

        get() = stream?.isSourceComplete == true
    
      override val socket: Socket
        get() = stream!!
    
      override fun createRequestBody(
        request: Request,
        contentLength: Long,
      ): Sink = stream!!.sink
    
      override fun writeRequestHeaders(request: Request) {
        if (stream != null) return
    
        val hasRequestBody = request.body != null
        val requestHeaders = http2HeadersList(request)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 21:11:09 UTC 2025
    - 7K bytes
    - Viewed (0)
  7. 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() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

          )
        stream.writeHeaders(
          responseHeaders = responseHeaders,
          outFinished = false,
          flushHeaders = false,
        )
        file.source().use { source ->
          stream.sink.buffer().use { sink ->
            sink.writeAll(source)
          }
        }
      }
    
      private fun contentType(file: File): String =
        when {
          file.name.endsWith(".css") -> "text/css"
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt

      @Throws(IOException::class)
      override fun contentLength(): Long = delegate.contentLength()
    
      @Throws(IOException::class)
      override fun writeTo(sink: BufferedSink) {
        delegate.writeTo(sink)
      }
    
      override fun isDuplex(): Boolean = delegate.isDuplex()
    
      override fun toString(): String = javaClass.simpleName + "(" + delegate.toString() + ")"
    
      init {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  10. okhttp/src/commonTest/kotlin/okhttp3/CompressionInterceptorTest.kt

        assertThat(response.body.string()).isEqualTo("Hello")
      }
    
      private fun gzip(data: String): Buffer {
        val result = Buffer()
        val sink = GzipSink(result).buffer()
        sink.writeUtf8(data)
        sink.close()
        return result
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 06:04:22 UTC 2025
    - 3K bytes
    - Viewed (0)
Back to top