Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 145 for system (0.41 sec)

  1. native-image-tests/src/main/kotlin/okhttp3/DotListener.kt

      }
    
      fun install() {
        originalSystemOut = System.out
        originalSystemErr = System.err
    
        System.setOut(object : PrintStream(OutputStream.nullOutputStream()) {})
        System.setErr(object : PrintStream(OutputStream.nullOutputStream()) {})
      }
    
      fun uninstall() {
        originalSystemOut.let {
          System.setOut(it)
        }
        originalSystemErr.let {
          System.setErr(it)
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/Progress.java

            if (done) {
              System.out.println("completed");
            } else {
              if (firstUpdate) {
                firstUpdate = false;
                if (contentLength == -1) {
                  System.out.println("content-length: unknown");
                } else {
                  System.out.format("content-length: %d\n", contentLength);
                }
              }
    
              System.out.println(bytesRead);
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

          override fun newThread(runnable: Runnable): Thread {
            return Thread(runnable, "$name-${nextId++}")
          }
        }
      }
    }
    
    fun getEnv(name: String) = System.getenv(name)
    
    val SYSTEM_FILE_SYSTEM = FileSystem.SYSTEM
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java

            // can be read from the cache.
            System.out.println("Force cache: true");
            clientForCall = client.newBuilder()
                .addNetworkInterceptor(REWRITE_CACHE_CONTROL_INTERCEPTOR)
                .build();
          } else {
            System.out.println("Force cache: false");
            clientForCall = client;
          }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.6K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformRule.kt

            if (platformSystemProperty == JDK9_PROPERTY) {
              if (System.getProperty("javax.net.debug") == null) {
                System.setProperty("javax.net.debug", "")
              }
            } else if (platformSystemProperty == CONSCRYPT_PROPERTY) {
              if (Security.getProviders()[0].name != "Conscrypt") {
                if (!Conscrypt.isAvailable()) {
                  System.err.println("Warning: Conscrypt not available")
                }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PerCallSettings.java

            .readTimeout(500, TimeUnit.MILLISECONDS)
            .build();
        try (Response response = client1.newCall(request).execute()) {
          System.out.println("Response 1 succeeded: " + response);
        } catch (IOException e) {
          System.out.println("Response 1 failed: " + e);
        }
    
        // Copy to customize OkHttp for this request.
        OkHttpClient client2 = client.newBuilder()
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.9K bytes
    - Viewed (0)
  7. samples/slack/src/main/java/okhttp3/slack/RtmSession.java

      @Override public synchronized void onOpen(WebSocket webSocket, Response response) {
        System.out.println("onOpen: " + response);
      }
    
      // TOOD(jwilson): decode incoming messages and dispatch them somewhere.
      @Override public void onMessage(WebSocket webSocket, String text) {
        System.out.println("onMessage: " + text);
      }
    
      @Override public void onClosing(WebSocket webSocket, int code, String reason) {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Nov 19 20:16:58 GMT 2016
    - 2.4K bytes
    - Viewed (0)
  8. native-image-tests/src/main/kotlin/okhttp3/RunTests.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import java.io.File
    import java.io.PrintWriter
    import kotlin.system.exitProcess
    import org.junit.jupiter.engine.JupiterTestEngine
    import org.junit.platform.console.options.Theme
    import org.junit.platform.engine.DiscoverySelector
    import org.junit.platform.engine.TestDescriptor
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/AutobahnTester.kt

              t: Throwable,
              response: Response?,
            ) {
              t.printStackTrace(System.out)
              latch.countDown()
            }
          },
        )
    
        check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." }
        val endNanos = System.nanoTime()
        val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get())
        println("Took ${tookMs}ms")
      }
    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)
  10. okcurl/src/main/kotlin/okhttp3/curl/logging/LoggingUtil.kt

        fun configureLogging(
          debug: Boolean,
          showHttp2Frames: Boolean,
          sslDebug: Boolean,
        ) {
          if (debug || showHttp2Frames || sslDebug) {
            if (sslDebug) {
              System.setProperty("javax.net.debug", "")
            }
            LogManager.getLogManager().reset()
            val handler =
              object : ConsoleHandler() {
                override fun publish(record: LogRecord) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.7K bytes
    - Viewed (1)
Back to top