Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for print_backtrace (0.22 sec)

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

        webSocket.close(1000, null);
        System.out.println("CLOSE: " + code + " " + reason);
      }
    
      @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) {
        t.printStackTrace();
      }
    
      public static void main(String... args) {
        new WebSocketEcho().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 04 11:40:21 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

        for (int i = 0; i < threadCount; i++) {
          executor.execute(() -> {
            try {
              drainQueue();
            } catch (Exception e) {
              e.printStackTrace();
            }
          });
        }
        executor.shutdown();
      }
    
      private void drainQueue() throws Exception {
        for (HttpUrl url; (url = queue.take()) != null; ) {
          if (!fetchedUrls.add(url)) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

                Thread.sleep(10);
                sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
              }
              sink.close();
            } catch (IOException | InterruptedException e) {
              e.printStackTrace();
            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
              if (x * i == n) return factor(x) + " × " + 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)
  4. samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java

            .url("http://publicobject.com/helloworld.txt")
            .build();
    
        client.newCall(request).enqueue(new Callback() {
          @Override public void onFailure(Call call, IOException e) {
            e.printStackTrace();
          }
    
          @Override public void onResponse(Call call, Response response) throws IOException {
            try (ResponseBody responseBody = response.body()) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.9K bytes
    - Viewed (0)
Back to top