Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for contentLength (0.57 sec)

  1. src/main/resources/crawler/contentlength.xml

    Shinsuke Sugaya <******@****.***> 1444546274 +0900
    XML
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Sun Oct 11 06:51:14 GMT 2015
    - 561 bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt

      sizeMapper: (T) -> Int,
    ): T {
      val contentLength = contentLength()
      if (contentLength > Int.MAX_VALUE) {
        throw IOException("Cannot buffer entire body for content length: $contentLength")
      }
    
      val bytes = source().use(consumer)
      val size = sizeMapper(bytes)
      if (contentLength != -1L && contentLength != size.toLong()) {
        throw IOException("Content-Length ($contentLength) and stream length ($size) disagree")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

      fun createRequestBody(
        request: Request,
        duplex: Boolean,
      ): Sink {
        this.isDuplex = duplex
        val contentLength = request.body!!.contentLength()
        eventListener.requestBodyStart(call)
        val rawRequestBody = codec.createRequestBody(request, contentLength)
        return RequestBodySink(rawRequestBody, contentLength)
      }
    
      @Throws(IOException::class)
      fun flushRequest() {
        try {
          codec.flushRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.2K bytes
    - Viewed (2)
  4. samples/guide/src/main/java/okhttp3/recipes/Progress.java

            if (done) {
              System.out.println("completed");
            } else {
              if (firstUpdate) {
                firstUpdate = false;
                if (contentLength == -1) {
                  System.out.println("content-length: unknown");
                } else {
                  System.out.format("content-length: %d\n", contentLength);
                }
              }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/RealResponseBody.kt

       * by malformed content types.
       */
      private val contentTypeString: String?,
      private val contentLength: Long,
      private val source: BufferedSource,
    ) : ResponseBody() {
      override fun contentLength(): Long = contentLength
    
      override fun contentType(): MediaType? = contentTypeString?.toMediaTypeOrNull()
    
      override fun source(): BufferedSource = source
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    internal class UnreadableResponseBody(
      private val mediaType: MediaType?,
      private val contentLength: Long,
    ) : ResponseBody(), Source {
      override fun contentType() = mediaType
    
      override fun contentLength() = contentLength
    
      override fun source() = buffer()
    
      override fun read(
        sink: Buffer,
        byteCount: Long,
      ): Long {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt

          if (contentType != null) {
            requestBuilder.header("Content-Type", contentType.toString())
          }
    
          val contentLength = body.contentLength()
          if (contentLength != -1L) {
            requestBuilder.header("Content-Length", contentLength.toString())
            requestBuilder.removeHeader("Transfer-Encoding")
          } else {
            requestBuilder.header("Transfer-Encoding", "chunked")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (2)
  8. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

      /**
       * Returns the number of bytes that will be written to sink in a call to [writeTo],
       * or -1 if that count is unknown.
       */
      @Throws(IOException::class)
      open fun contentLength(): Long = commonContentLength()
    
      /** Writes the content of this request to [sink]. */
      @Throws(IOException::class)
      abstract fun writeTo(sink: BufferedSink)
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 25 14:41:37 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingResponseBody.kt

      fun delegate(): ResponseBody {
        return delegate
      }
    
      override fun contentType(): MediaType? {
        return delegate.contentType()
      }
    
      override fun contentLength(): Long {
        return delegate.contentLength()
      }
    
      override fun source(): BufferedSource {
        return delegate.source()
      }
    
      override fun toString(): String {
        return javaClass.simpleName + "(" + delegate.toString() + ")"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt

        return delegate
      }
    
      override fun contentType(): MediaType? {
        return delegate.contentType()
      }
    
      @Throws(IOException::class)
      override fun contentLength(): Long {
        return delegate.contentLength()
      }
    
      @Throws(IOException::class)
      override fun writeTo(sink: BufferedSink) {
        delegate.writeTo(sink)
      }
    
      override fun isDuplex(): Boolean {
        return delegate.isDuplex()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
Back to top