Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for toByte (0.15 sec)

  1. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

    internal const val TYPE_VALID = 6
    
    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)
      }
    }
    
    /**
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

    private fun isMappedIpv4Address(address: ByteArray): Boolean {
      if (address.size != 16) return false
    
      for (i in 0 until 10) {
        if (address[i] != 0.toByte()) return false
      }
    
      if (address[10] != 255.toByte()) return false
      if (address[11] != 255.toByte()) return false
    
      return true
    }
    
    /** Encodes an IPv4 address in canonical form according to RFC 4001. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

    private fun Buffer.skipCommasAndWhitespace(): Boolean {
      var commaFound = false
      loop@ while (!exhausted()) {
        when (this[0]) {
          ','.code.toByte() -> {
            // Consume ','.
            readByte()
            commaFound = true
          }
    
          ' '.code.toByte(), '\t'.code.toByte() -> {
            readByte()
            // Consume space or tab.
          }
    
          else -> break@loop
        }
      }
      return commaFound
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/HostnamesTest.kt

            byteArrayOf(192.toByte(), 168.toByte(), 0, 1),
          ),
        ).isEqualTo("192.168.0.1")
    
        assertThat(
          inet4AddressToAscii(
            byteArrayOf(252.toByte(), 253.toByte(), 254.toByte(), 255.toByte()),
          ),
        ).isEqualTo("252.253.254.255")
    
        assertThat(
          inet4AddressToAscii(
            byteArrayOf(255.toByte(), 255.toByte(), 255.toByte(), 255.toByte()),
          ),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 30 06:23:33 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

         */
        @JvmField
        val FORM = "multipart/form-data".toMediaType()
    
        private val COLONSPACE = byteArrayOf(':'.code.toByte(), ' '.code.toByte())
        private val CRLF = byteArrayOf('\r'.code.toByte(), '\n'.code.toByte())
        private val DASHDASH = byteArrayOf('-'.code.toByte(), '-'.code.toByte())
    
        /**
         * Appends a quoted-string to a StringBuilder.
         *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

            // array.
            while (mid > -1 && this[mid] != '\n'.code.toByte()) {
              mid--
            }
            mid++
    
            // Now look for the ending '\n'.
            var end = 1
            while (this[mid + end] != '\n'.code.toByte()) {
              end++
            }
            val publicSuffixLength = mid + end - mid
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/idn/StringprepReader.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)
      }
    }
    
    class MappingListCodePointMapping(
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val source = response.body.source()
        source.timeout().timeout(1000, TimeUnit.MILLISECONDS)
        assertThat(source.readByte()).isEqualTo('A'.code.toByte())
        assertThat(source.readByte()).isEqualTo('B'.code.toByte())
        assertThat(source.readByte()).isEqualTo('C'.code.toByte())
        assertFailsWith<SocketTimeoutException> {
          source.readByte() // If Content-Length was accurate, this would return -1 immediately.
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

          throw ProtocolException("constructed strings not supported for DER")
        }
        return source.readUtf8(bytesLeft)
      }
    
      fun readObjectIdentifier(): String {
        val result = Buffer()
        val dot = '.'.code.toByte().toInt()
        when (val xy = readVariableLengthLong()) {
          in 0L until 40L -> {
            result.writeDecimalLong(0)
            result.writeByte(dot)
            result.writeDecimalLong(xy)
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketProtocol.kt

              // and convert back to byte.
              val bufferInt: Int = buffer[i].toInt()
              val keyInt: Int = key[keyIndex].toInt()
              buffer[i] = (bufferInt xor keyInt).toByte()
    
              i++
              keyIndex++
            }
          }
        } while (cursor.next() != -1)
      }
    
      fun closeCodeExceptionMessage(code: Int): String? {
        return if (code < 1000 || code >= 5000) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
Back to top