Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for written (0.29 sec)

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

        outFrames.add(OutFrame(frameCount++, bytesOut.size, false))
        return writer
      }
    
      /**
       * Shortens the last frame from its original length to `length`. This will cause the peer to
       * close the socket as soon as this frame has been written; otherwise the peer stays open until
       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
        val lastFrame = outFrames.removeAt(outFrames.size - 1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        val metadataBuffer = Buffer()
        metadataBuffer.write(metadata)
    
        val fileOperator = FileOperator(file!!.channel)
        fileOperator.write(FILE_HEADER_SIZE + upstreamSize, metadataBuffer, metadata.size.toLong())
      }
    
      @Throws(IOException::class)
      fun commit(upstreamSize: Long) {
        // Write metadata to the end of the file.
        writeMetadata(upstreamSize)
        file!!.channel.force(false)
    
    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)
  3. docs/changelogs/changelog_4x.md

     *  Fix: Reliably update and invalidate the disk cache on windows. As originally designed our
        internal `DiskLruCache` assumes an inode-like file system, where it's fine to delete files that
        are currently being read or written. On Windows the file system forbids this so we must be more
        careful when deleting and renaming files.
    
     *  Fix: Don't crash on Java 8u252 which introduces an API previously found only on Java 9 and
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

      fun fromDer(byteString: ByteString): T {
        val buffer = Buffer().write(byteString)
        val reader = DerReader(buffer)
        return fromDer(reader)
      }
    
      /**
       * Writes [value] to this adapter, unless it is the default value and can be safely omitted.
       *
       * If this does write a value, it will write a tag and a length and a full value.
       */
      fun toDer(
        writer: DerWriter,
        value: T,
      )
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

        assertOnFileDescriptor(content = "Hello") { fd ->
          val requestBody = fd.toRequestBody()
    
          val buffer = Buffer()
          requestBody.writeTo(buffer)
          assertThat(buffer.readUtf8()).isEqualTo("Hello")
    
          assertThrows(IOException::class.java) {
            requestBody.writeTo(Buffer())
          }
        }
      }
    
      @Test
      fun testFileDescriptorAfterClose() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

          )
    
        call.execute().use { response ->
          assertThat(response.body.string()).isEqualTo("abc")
          val requestBodyOut = requestBody.takeSink()
          assertFailsWith<IOException> {
            SlowRequestBody.writeTo(requestBodyOut)
          }
          assertFailsWith<IOException> {
            requestBodyOut.close()
          }
        }
    
        // Confirm that the connection pool was not corrupted by making another call.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

              url = server.url("/"),
              body =
                object : ForwardingRequestBody(transferKind.newRequestBody("def")) {
                  override fun writeTo(sink: BufferedSink) {
                    sinkReference.set(sink)
                    super.writeTo(sink)
                  }
                },
            ),
          )
        assertThat(readAscii(response.body.byteStream(), Int.MAX_VALUE))
          .isEqualTo("abc")
    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)
  8. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      }
    
      @Test fun `decode raw sequence`() {
        val buffer =
          Buffer()
            .write("300A".decodeHex())
            .write("1505".decodeHex())
            .write("Smith".encodeUtf8())
            .write("01".decodeHex())
            .write("01".decodeHex())
            .write("FF".decodeHex())
    
        val derReader = DerReader(buffer)
    
        derReader.read("test") { header ->
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

      public void run() throws Exception {
        RequestBody requestBody = new RequestBody() {
          @Override public MediaType contentType() {
            return MEDIA_TYPE_MARKDOWN;
          }
    
          @Override public void writeTo(BufferedSink sink) throws IOException {
            sink.writeUtf8("Numbers\n");
            sink.writeUtf8("-------\n");
            for (int i = 2; i <= 997; i++) {
              sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  10. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

      internal class StoriesTestProvider : SimpleProvider() {
        override fun arguments(): List<Any> = createStories(RAW_DATA)
      }
    
      private val bytesOut = Buffer()
      private val hpackWriter = Hpack.Writer(out = bytesOut)
    
      @ParameterizedTest
      @ArgumentsSource(StoriesTestProvider::class)
      fun testRoundTrip(story: Story) {
        assumeFalse(
          story === Story.MISSING,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
Back to top