Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for getSource (0.17 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        peer.acceptFrame() // RST_STREAM
        peer.play()
        val connection = connect(peer)
        val stream1 = connection.newStream(headerEntries("b", "bark"), false)
        val source = stream1.getSource()
        val buffer = Buffer()
        while (buffer.size != 1024L) source.read(buffer, 1024)
        stream1.close(ErrorCode.CANCEL, null)
        val frame1 = peer.takeFrame()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/RealStream.kt

    import okio.buffer
    
    /** Adapt OkHttp's internal [Http2Stream] type to the public [Stream] type. */
    internal class RealStream(
      private val http2Stream: Http2Stream,
    ) : Stream {
      override val requestBody = http2Stream.getSource().buffer()
      override val responseBody = http2Stream.getSink().buffer()
    
      override fun cancel() {
        http2Stream.closeLater(ErrorCode.CANCEL)
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 31 18:24:52 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Cache.kt

            cache[key] ?: return null
          } catch (_: IOException) {
            return null // Give up because the cache cannot be read.
          }
    
        val entry: Entry =
          try {
            Entry(snapshot.getSource(ENTRY_METADATA))
          } catch (_: IOException) {
            snapshot.closeQuietly()
            return null
          }
    
        val response = entry.response(snapshot)
        if (!entry.matches(request, response)) {
    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)
  4. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

      fun readingTheSameStreamMultipleTimes(parameters: Pair<FileSystem, Boolean>) {
        setUp(parameters.first, parameters.second)
        set("a", "a", "b")
        val snapshot = cache["a"]!!
        assertThat(snapshot.getSource(0)).isSameAs(snapshot.getSource(0))
        snapshot.close()
      }
    
      @ParameterizedTest
      @ArgumentsSource(FileSystemParamProvider::class)
      fun rebuildJournalOnRepeatedReads(parameters: Pair<FileSystem, Boolean>) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

          this.sink.trailers = trailers
        }
      }
    
      fun readTimeout(): Timeout = readTimeout
    
      fun writeTimeout(): Timeout = writeTimeout
    
      /** Returns a source that reads data from the peer. */
      fun getSource(): Source = source
    
      /**
       * Returns a sink that can be used to write data to the peer.
       *
       * @throws IllegalStateException if this stream was initiated by the peer and a [writeHeaders] has
    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)
  6. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                  expectedByteCount = contentLengthString?.toLong() ?: Long.MAX_VALUE,
                  socket = socket,
                ).buffer()
              requestBodySink.use {
                it.writeAll(stream.getSource())
              }
            } catch (e: IOException) {
              exception = e
            }
          }
    
          return RecordedRequest(
            requestLine = requestLine,
            headers = headers,
    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)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

         */
        @Throws(IOException::class)
        fun edit(): Editor? = ******@****.***(key, sequenceNumber)
    
        /** Returns the unbuffered stream with the value for [index]. */
        fun getSource(index: Int): Source = sources[index]
    
        /** Returns the byte length of the value for [index]. */
        fun getLength(index: Int): Long = lengths[index]
    
        override fun close() {
          for (source in sources) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
Back to top