Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for Skip (0.14 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/src/main/kotlin/okhttp3/MultipartReader.kt

            source.skip(dashDashBoundary.size.toLong())
          } else {
            // This is a subsequent part or a preamble. Skip until "\r\n--" followed by the boundary.
            while (true) {
              val toSkip = currentPartBytesRemaining(maxResult = 8192)
              if (toSkip == 0L) break
              source.skip(toSkip)
            }
            source.skip(crlfDashDashBoundary.size.toLong())
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

          )
    
        assertFailsWith<ProtocolException> {
          parts.nextPart()
        }.also { expected ->
          assertThat(expected).hasMessage("expected at least 1 part")
        }
      }
    
      @Test fun `skip preamble`() {
        val multipart =
          """
          |this is the preamble! it is invisible to application code
          |
          |--simple boundary
          |
          |abcd
          |--simple boundary--
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache/FaultHidingSink.kt

      val onException: (IOException) -> Unit,
    ) : ForwardingSink(delegate) {
      private var hasErrors = false
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        if (hasErrors) {
          source.skip(byteCount)
          return
        }
        try {
          super.write(source, byteCount)
        } catch (e: IOException) {
          hasErrors = true
          onException(e)
        }
      }
    
      override fun flush() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/FormBodyTest.kt

          FormBody.Builder()
            .add("a", String(intArrayOf('b'.code, codePoint, 'c'.code), 0, 3))
            .build()
        val buffer = Buffer()
        body.writeTo(buffer)
        buffer.skip(3) // Skip "a=b" prefix.
        return buffer.readUtf8(buffer.size - 1) // Skip the "c" suffix.
      }
    
      @Test
      fun manualCharset() {
        val body =
          FormBody.Builder(StandardCharsets.ISO_8859_1)
            .add("name", "Nicolás")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. 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)
  10. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

     *  6. Read from and close that source.
     *
     * Exchanges that do not have a request body may skip creating and closing the request body.
     * Exchanges that do not have a response body can call
     * [newFixedLengthSource(0)][newFixedLengthSource] and may skip reading and closing that source.
     */
    class Http1ExchangeCodec(
      /** The client that configures this stream. May be null for HTTPS proxy tunnels. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top