Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for trim (0.18 sec)

  1. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

              }
            }
          }
    
          ImportResults(sortedRules, sortedExceptionRules, totalRuleBytes, totalExceptionRuleBytes)
        }
    
      private fun String.toRule(): ByteString? {
        if (trim { it <= ' ' }.isEmpty() || startsWith("//")) return null
        if (contains(WILDCARD_CHAR)) {
          assertWildcardRule(this)
        }
        return encodeUtf8()
      }
    
      data class ImportResults(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              FILE_HEADER_SIZE + upstreamPos,
              upstreamBuffer.clone(),
              upstreamBytesRead,
            )
    
            synchronized(this@Relay) {
              // Append new upstream bytes into the buffer. Trim it to its max size.
              buffer.write(upstreamBuffer, upstreamBytesRead)
              if (buffer.size > bufferMaxSize) {
                buffer.skip(buffer.size - bufferMaxSize)
              }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

          throw noMoreExchanges(e) as Throwable
        } finally {
          if (!calledNoMoreExchanges) {
            noMoreExchanges(null)
          }
        }
      }
    
      /**
       * Prepare for a potential trip through all of this call's network interceptors. This prepares to
       * find an exchange to carry the request.
       *
       * Note that an exchange will not be needed if the request is satisfied by the cache.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            if (contentLength == -1L && lowercaseHeader.startsWith("content-length:")) {
              contentLength = header.substring(15).trim().toLong()
            }
            if (lowercaseHeader.startsWith("transfer-encoding:") &&
              lowercaseHeader.substring(18).trim() == "chunked"
            ) {
              chunked = true
            }
          }
    
          val peek = dispatcher.peek()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

      @get:Synchronized @set:Synchronized
      var maxSize: Long = maxSize
        set(value) {
          field = value
          if (initialized) {
            cleanupQueue.schedule(cleanupTask) // Trim the existing store if necessary.
          }
        }
    
      /*
       * This cache uses a journal file named "journal". A typical journal file looks like this:
       *
       *     libcore.io.DiskLruCache
       *     1
    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)
  6. .editorconfig

    root = true
    
    [*]
    indent_size = 2
    ij_continuation_indent_size = 2
    charset = utf-8
    trim_trailing_whitespace = true
    insert_final_newline = true
    
    [*.{kt, kts}]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 185 bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-HeadersCommon.kt

    internal fun Map<String, String>.commonToHeaders(): Headers {
      // Make a defensive copy and clean it up.
      val namesAndValues = arrayOfNulls<String>(size * 2)
      var i = 0
      for ((k, v) in this) {
        val name = k.trim()
        val value = v.trim()
        headersCheckName(name)
        headersCheckValue(value, name)
        namesAndValues[i] = name
        namesAndValues[i + 1] = value
        i += 2
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

          }
        }
    
        var pos = 0
        while (pos < value.length) {
          val tokenStart = pos
          pos = value.indexOfElement("=,;", pos)
          val directive = value.substring(tokenStart, pos).trim()
          val parameter: String?
    
          if (pos == value.length || value[pos] == ',' || value[pos] == ';') {
            pos++ // Consume ',' or ';' (if necessary).
            parameter = null
          } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  9. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

      val mimeType =
        headers?.let {
          for (header in it) {
            val parts = header.split(':', limit = 2)
            if ("Content-Type".equals(parts[0], ignoreCase = true)) {
              return@let parts[1].trim()
            }
          }
          return@let null
        } ?: "application/x-www-form-urlencoded"
    
      return mimeType.toMediaTypeOrNull()
    }
    
    private fun isSpecialHeader(s: String): Boolean {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        set("b", "bb", "bbb")
    
        // Cause the cache trim job to fail.
        filesystem.setFaultyDelete(cacheDir / "a.0", true)
        taskFaker.runNextTask()
    
        // An edit should now add a job to clean up if the most recent trim failed.
        assertThat(cache.edit("b")).isNull()
        taskFaker.runNextTask()
    
        // Confirm a successful cache trim now allows edits.
        filesystem.setFaultyDelete(cacheDir / "a.0", false)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
Back to top