Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for Read (0.16 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

      private val countingSource: CountingSource = CountingSource(source)
      private val source: BufferedSource = countingSource.buffer()
    
      /** Total bytes read thus far. */
      private val byteCount: Long
        get() = countingSource.bytesRead - source.buffer.size
    
      /** How many bytes to read before [peekHeader] should return false, or -1L for no limit. */
      private var limit = -1L
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            }
    
            // Fill the receive buffer without holding any locks.
            val read = source.read(receiveBuffer, remainingByteCount)
            if (read == -1L) throw EOFException()
            remainingByteCount -= read
    
            // Move the received data to the read buffer to the reader can read it. If this source has
            // been closed since this read began we must discard the incoming data and tell the
            // connection we've done so.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

     *
     * Every [edit] call must be matched by a call to [Editor.commit] or [Editor.abort]. Committing is
     * atomic: a read observes the full set of values as they were before or after the commit, but never
     * a mix of values.
     *
     * Clients call [get] to read a snapshot of an entry. The read will observe the value at the time
     * that [get] was called. Updates and removals after the call do not impact ongoing reads.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

        val b1 = source.readByte() and 0xff
    
        val isMasked = b1 and B1_FLAG_MASK != 0
        if (isMasked == isClient) {
          // Masked payloads must be read on the server. Unmasked payloads must be read on the client.
          throw ProtocolException(
            if (isClient) {
              "Server-sent frames must not be masked."
            } else {
              "Client-sent frames must be masked."
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

        }
      }
    
      /**
       * Reads the public suffix list treating the operation as uninterruptible. We always want to read
       * the list otherwise we'll be left in a bad state. If the thread was interrupted prior to this
       * operation, it will be re-interrupted after the list is read.
       */
      private fun readTheListUninterruptibly() {
        var interrupted = false
        try {
          while (true) {
            try {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/EventListener.kt

       * application. This may be smaller than the resource's byte count if were read to completion.
       *
       * This method is always invoked after [responseBodyStart].
       */
      open fun responseBodyEnd(
        call: Call,
        byteCount: Long,
      ) {
      }
    
      /**
       * Invoked when a response fails to be read.
       *
       * Note that response failures do not necessarily fail the entire call.
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

          Encrypted,
          Setup,
          Unknown,
        }
    
        val type: Type
          get() =
            when {
              message == "adding as trusted certificates" -> Type.Setup
              message == "Raw read" || message == "Raw write" -> Type.Encrypted
              message == "Plaintext before ENCRYPTION" || message == "Plaintext after DECRYPTION" -> Type.Plaintext
              message.startsWith("System property ") -> Type.Setup
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        /** The next byte to read. This is always less than or equal to [upstreamPos]. */
        private var sourcePos = 0L
    
        /**
         * Selects where to find the bytes for a read and read them. This is one of three sources.
         *
         * ## Upstream
         *
         * In this case the current thread is assigned as the upstream reader. We read bytes from
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

          val ttl = buf.readInt().toLong() and 0xffffffffL // ttl
          val length = buf.readShort().toInt() and 0xffff
    
          if (type == TYPE_A || type == TYPE_AAAA) {
            val bytes = ByteArray(length)
            buf.read(bytes)
            result.add(InetAddress.getByAddress(bytes))
          } else {
            buf.skip(length.toLong())
          }
        }
    
        return result
      }
    
      @Throws(EOFException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

          )
        val response = call.execute()
        interruptLater(500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
          while (responseBody.read(buffer) != -1) {
          }
        }
        responseBody.close()
      }
    
      private fun sleep(delayMillis: Int) {
        try {
          Thread.sleep(delayMillis.toLong())
        } catch (e: InterruptedException) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top