Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for Writer (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

          reader = null
    
          if (enqueuedClose && messageAndCloseQueue.isEmpty()) {
            // Close the writer on the writer's thread.
            val writerToClose = this.writer
            if (writerToClose != null) {
              this.writer = null
              taskQueue.execute("$name writer close", cancelable = false) {
                writerToClose.closeQuietly()
              }
            }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          }
          if (associatedStreamId == 0) {
            writer.headers(outFinished, streamId, requestHeaders)
          } else {
            require(!client) { "client streams shouldn't have associated stream IDs" }
            // HTTP/2 has a PUSH_PROMISE frame.
            writer.pushPromise(associatedStreamId, streamId, requestHeaders)
          }
        }
    
        if (flushHeaders) {
          writer.flush()
        }
    
        return stream
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

                bytes = bytes,
              )
            }
          }
    
          override fun toDer(
            writer: DerWriter,
            value: AnyValue,
          ) {
            writer.write("ANY", value.tagClass, value.tag) {
              writer.writeOctetString(value.bytes)
              writer.constructed = value.constructed
            }
          }
        }
    
      internal fun parseGeneralizedTime(string: String): Long {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

        val newMaxFrameSize = 16777215
        val writer = Http2Writer(Buffer(), true)
        writer.applyAndAckSettings(Settings().set(Settings.MAX_FRAME_SIZE, newMaxFrameSize))
        assertThat(writer.maxDataLength()).isEqualTo(newMaxFrameSize)
        writer.frameHeader(0, newMaxFrameSize, Http2.TYPE_DATA, FLAG_NONE)
      }
    
      @Test fun streamIdHasReservedBit() {
        val writer = Http2Writer(Buffer(), true)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

        // Use a new Writer because we don't support change the dynamic table
        // size after Writer constructed.
        val writer = Hpack.Writer(110, false, bytesOut)
        writer.writeHeaders(headerBlock)
        assertThat(bytesOut).isEqualTo(bytesIn)
        assertThat(writer.headerCount).isEqualTo(2)
        val tableLength = writer.dynamicTable.size
        var entry = writer.dynamicTable[tableLength - 1]!!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  6. build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/codegen/ApiExtensionsGenerator.kt

        outputFile.bufferedWriter().use { writer ->
            writer.write(fileHeaderFor(packageName, isIncubatingFileClass(targetType, extensions)))
            writer.write("\n")
            extensions.forEach {
                writer.write("\n${it.toKotlinString()}")
            }
        }
    
    
    /**
    Plain Text
    - Registered: Wed Feb 28 11:36:09 GMT 2024
    - Last Modified: Wed Dec 20 21:41:53 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

            }
          }
    
          override fun toDer(
            writer: DerWriter,
            value: Long,
          ) {
            // [1950-01-01T00:00:00..2050-01-01T00:00:00Z)
            if (value in -631_152_000_000L until 2_524_608_000_000L) {
              Adapters.UTC_TIME.toDer(writer, value)
            } else {
              Adapters.GENERALIZED_TIME.toDer(writer, value)
            }
          }
        }
    
      /**
       * ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.6K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/RequestTest.kt

        assertThat(bodyToHex(body), "Retransmit body").isEqualTo("48656c6c6f")
      }
    
      @Test
      fun file() {
        val file = File.createTempFile("RequestTest", "tmp")
        val writer = FileWriter(file)
        writer.write("abc")
        writer.close()
        val contentType = "text/plain".toMediaType()
        val body: RequestBody = file.asRequestBody(contentType)
        assertThat(body.contentType()).isEqualTo(contentType)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

      private var maxFrameSize: Int = INITIAL_MAX_FRAME_SIZE
      private var closed: Boolean = false
      val hpackWriter: Hpack.Writer = Hpack.Writer(out = hpackBuffer)
    
      @Throws(IOException::class)
      fun connectionPreface() {
        this.withLock {
          if (closed) throw IOException("closed")
          if (!client) return // Nothing to write; servers don't send connection headers!
          if (logger.isLoggable(FINE)) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          } catch (_: NumberFormatException) {
            invalidLengths(strings)
          }
        }
    
        /** Append space-prefixed lengths to [writer]. */
        @Throws(IOException::class)
        internal fun writeLengths(writer: BufferedSink) {
          for (length in lengths) {
            writer.writeByte(' '.code).writeDecimalLong(length)
          }
        }
    
        @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
Back to top