Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for readUtf8LineStrict (0.3 sec)

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

            val urlLine = source.readUtf8LineStrict()
            // Choice here is between failing with a correct RuntimeException
            // or mostly silently with an IOException
            url = urlLine.toHttpUrlOrNull() ?: throw IOException("Cache corruption for $urlLine").also {
              Platform.get().log("cache corruption", WARN, it)
            }
            requestMethod = source.readUtf8LineStrict()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        var failure: IOException? = null
    
        try {
          request = source.readUtf8LineStrict()
          if (request.isEmpty()) {
            throw ProtocolException("no request because the stream is exhausted")
          }
    
          while (true) {
            val header = source.readUtf8LineStrict()
            if (header.isEmpty()) {
              break
            }
            addHeaderLenient(headers, header)
    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)
  3. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

          var totalRuleBytes = 0
          var totalExceptionRuleBytes = 0
    
          fileSystem.source(publicSuffixListDotDat).buffer().use { source ->
            while (!source.exhausted()) {
              var rule: ByteString = source.readUtf8LineStrict().toRule() ?: continue
    
              if (rule.startsWith(EXCEPTION_RULE_MARKER)) {
                rule = rule.substring(1)
                // We use '\n' for end of value.
                totalExceptionRuleBytes += rule.size + 1
    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)
Back to top