Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for Numbers (0.19 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

        }
      }
    
      private void streamPrimesToSinkAsynchronously(final BufferedSink sink) {
        Thread thread = new Thread("writer") {
          @Override public void run() {
            try {
              sink.writeUtf8("Numbers\n");
              sink.writeUtf8("-------\n");
              for (int i = 2; i <= 997; i++) {
                System.out.println(i);
                Thread.sleep(10);
                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
    - 3.1K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

          @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)));
            }
          }
    
          private String factor(int n) {
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

     * @param valueCount the number of values per cache entry. Must be positive.
     * @param maxSize the maximum number of bytes this cache should use to store.
     */
    class DiskLruCache(
      fileSystem: FileSystem,
      /** Returns the directory where this cache stores its data. */
      val directory: Path,
      private val appVersion: Int,
      internal val valueCount: Int,
    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)
  4. docs/recipes.md

          fun run() {
            val requestBody = object : RequestBody() {
              override fun contentType() = MEDIA_TYPE_MARKDOWN
    
              override fun writeTo(sink: BufferedSink) {
                sink.writeUtf8("Numbers\n")
                sink.writeUtf8("-------\n")
                for (i in 2..997) {
                  sink.writeUtf8(String.format(" * $i = ${factor(i)}\n"))
                }
              }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt

      fun run() {
        val requestBody =
          object : RequestBody() {
            override fun contentType() = MEDIA_TYPE_MARKDOWN
    
            override fun writeTo(sink: BufferedSink) {
              sink.writeUtf8("Numbers\n")
              sink.writeUtf8("-------\n")
              for (i in 2..997) {
                sink.writeUtf8(String.format(" * $i = ${factor(i)}\n"))
              }
            }
    
            private fun factor(n: Int): String {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        // ... but they're included in toString().
        assertThat(parse("http://[::1]/").toString()).isEqualTo("http://[::1]/")
    
        // IPv6 colons don't interfere with port numbers or passwords.
        assertThat(parse("http://[::1]:8080/").port).isEqualTo(8080)
        assertThat(parse("http://user:password@[::1]/").password).isEqualTo("password")
    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)
  7. okhttp/src/test/java/okhttp3/AutobahnTester.kt

      }
    
      fun run() {
        try {
          val count = getTestCount()
          println("Test count: $count")
          for (number in 1..count) {
            runTest(number, count)
          }
          updateReports()
        } finally {
          client.dispatcher.executorService.shutdown()
        }
      }
    
      private fun runTest(
        number: Long,
        count: Long,
      ) {
        val latch = CountDownLatch(1)
        val startNanos = AtomicLong()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/flowcontrol/WindowCounter.kt

     * limitations under the License.
     */
    package okhttp3.internal.http2.flowcontrol
    
    class WindowCounter(
      val streamId: Int,
    ) {
      /** The total number of bytes consumed. */
      var total: Long = 0L
        private set
    
      /** The total number of bytes acknowledged by outgoing `WINDOW_UPDATE` frames. */
      var acknowledged: Long = 0L
        private set
    
      val unacknowledged: Long
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/Progress.java

            long totalBytesRead = 0L;
    
            @Override public long read(Buffer sink, long byteCount) throws IOException {
              long bytesRead = super.read(sink, byteCount);
              // read() returns the number of bytes read, or -1 if this source is exhausted.
              totalBytesRead += bytesRead != -1 ? bytesRead : 0;
              progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

      /** The bytes consumed and acknowledged by the stream. */
      val readBytes: WindowCounter = WindowCounter(id)
    
      /** The total number of bytes produced by the application. */
      var writeBytesTotal = 0L
        internal set
    
      /** The total number of bytes permitted to be produced by incoming `WINDOW_UPDATE` frame. */
      var writeBytesMaximum: Long = connection.peerSettings.initialWindowSize.toLong()
        internal set
    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)
Back to top