Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for skip (0.15 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt

                callback.onRetryChange(retryMs)
              }
            }
    
            -1 -> {
              val lineEnd = source.indexOfElement(CRLF)
              if (lineEnd != -1L) {
                // Skip the line and newline
                source.skip(lineEnd)
                source.select(options)
              } else {
                return false // No more newlines.
              }
            }
    
            else -> throw AssertionError()
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

    private fun BufferedSource.skipWhitespace() {
      while (!exhausted()) {
        if (buffer[0] != ' '.code.toByte()) return
        skip(1L)
      }
    }
    
    private fun BufferedSource.skipRestOfLine() {
      when (val newline = indexOf('\n'.code.toByte())) {
        -1L -> skip(buffer.size) // Exhaust this source.
        else -> skip(newline + 1)
      }
    }
    
    /**
     * Reads lines from `IdnaMappingTable.txt`.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              // 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)
              }
    
              // Now that the file and buffer have bytes, adjust upstreamPos.
              ******@****.***amPos += upstreamBytesRead
            }
    
            return bytesRead
    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)
  4. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

            '{'.code,
            '}'.code,
            '|'.code,
            '^'.code,
            '\''.code,
            ';'.code,
            '='.code,
            '@'.code,
          )
          .override(
            Encoding.SKIP,
            ':'.code,
            '/'.code,
            '\\'.code,
            '?'.code,
            '#'.code,
          )
          .test(UrlComponentEncodingTester.Component.USER)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        if (length < 0) {
          // compressed name pointer, first two bits are 1
          // drop second byte of compression offset
          source.skip(1)
        } else {
          while (length > 0) {
            // skip each part of the domain name
            source.skip(length.toLong())
            length = source.readByte().toInt()
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt

              testPunycode(codePointString, component)
              continue
            }
            testEncodeAndDecode(codePoint, codePointString, component)
            if (encoding == Encoding.SKIP) continue
            testParseOriginal(codePoint, codePointString, encoding, component)
            testParseAlreadyEncoded(codePoint, encoding, component)
    
            val platform = urlComponentEncodingTesterJvmPlatform(component)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            if (flowControlError) {
              source.skip(remainingByteCount)
              closeLater(ErrorCode.FLOW_CONTROL_ERROR)
              return
            }
    
            // Discard data received after the stream is finished. It's probably a benign race.
            if (finished) {
              source.skip(remainingByteCount)
              return
            }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

        codePoint = input.codePointAt(i)
        if (alreadyEncoded && (
            codePoint == '\t'.code || codePoint == '\n'.code ||
              codePoint == '\u000c'.code || codePoint == '\r'.code
          )
        ) {
          // Skip this character.
        } else if (codePoint == ' '.code && encodeSet === FORM_ENCODE_SET) {
          // Encode ' ' as '+'.
          writeUtf8("+")
        } else if (codePoint == '+'.code && plusIsSpace) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        ) {
          val toRead = minOf(remainingByteCount, byteCount)
          if (toRead > 0L) {
            source.read(buffer, toRead)
          }
          val toSkip = byteCount - toRead
          if (toSkip > 0L) {
            source.skip(toSkip)
          }
          remainingByteCount -= toRead
          receivedByteCount += byteCount
        }
    
        @Throws(IOException::class)
        override fun flush() {
        }
    
    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)
  10. okhttp/src/test/java/okhttp3/CacheTest.kt

        server.enqueue(mockResponse.build())
    
        // Make sure that calling skip() doesn't omit bytes from the cache.
        val request = Request.Builder().url(server.url("/")).build()
        val response1 = client.newCall(request).execute()
        val in1 = response1.body.source()
        assertThat(in1.readUtf8("I love ".length.toLong())).isEqualTo("I love ")
        in1.skip("puppies but hate ".length.toLong())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top