- Sort Score
- Num 10 results
- Language All
Results 391 - 400 of 2,240 for throwIf (0.04 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt
} /** Returns a plan for the first attempt at [route]. This throws if no plan is possible. */ @Throws(IOException::class) internal fun planConnectToRoute( route: Route, routes: List<Route>? = null, ): ConnectPlan { if (route.address.sslSocketFactory == null) { if (ConnectionSpec.CLEARTEXT !in route.address.connectionSpecs) { throw UnknownServiceException("CLEARTEXT communication not enabled for client")
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.1K bytes - Click Count (0) -
android/guava/src/com/google/common/eventbus/Subscriber.java
* synchronized. */ @VisibleForTesting void invokeSubscriberMethod(Object event) throws InvocationTargetException { try { method.invoke(target, checkNotNull(event)); } catch (IllegalArgumentException e) { throw new Error("Method rejected target/argument: " + event, e); } catch (IllegalAccessException e) { throw new Error("Method became inaccessible: " + event, e); } catch (InvocationTargetException e) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed May 14 19:40:47 GMT 2025 - 4.7K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java
} @Override public MediaType contentType() { return MEDIA_TYPE_MARKDOWN; } @Override public void writeTo(BufferedSink sink) throws IOException { sink.writeAll(pipe.source()); } } public static void main(String... args) throws Exception { new PostStreamingWithPipe().run(); }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Jul 06 03:18:15 GMT 2018 - 3.1K bytes - Click Count (0) -
android/guava/src/com/google/common/io/CharSequenceReader.java
public synchronized void mark(int readAheadLimit) throws IOException { checkArgument(readAheadLimit >= 0, "readAheadLimit (%s) may not be negative", readAheadLimit); checkOpen(); mark = pos; } @Override public synchronized void reset() throws IOException { checkOpen(); pos = mark; } @Override public synchronized void close() throws IOException { seq = null; }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 4.5K bytes - Click Count (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
} public void start() throws Exception { if (mockWebServer != null) throw new IllegalStateException(); mockWebServer = new MockWebServer(); mockWebServer.setDispatcher(this); mockWebServer.start(slackApi.port); } public HttpUrl newAuthorizeUrl(String scopes, String team, Listener listener) { if (mockWebServer == null) throw new IllegalStateException();
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 3.8K bytes - Click Count (1) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainServerSocketFactory.java
this.path = path; } @Override public ServerSocket createServerSocket() throws IOException { return new UnixDomainServerSocket(); } @Override public ServerSocket createServerSocket(int port) throws IOException { return createServerSocket(); } @Override public ServerSocket createServerSocket(int port, int backlog) throws IOException { return createServerSocket(); }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 12 16:33:52 GMT 2019 - 3.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
throw ProtocolException( "HTTP $code had non-zero Content-Length: ${response.body.contentLength()}", ) } return response } catch (e: IOException) { if (sendRequestException != null) { sendRequestException.addSuppressed(e) throw sendRequestException } throw e } }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Oct 30 13:46:58 GMT 2025 - 7.6K bytes - Click Count (0) -
android/guava/src/com/google/common/eventbus/SubscriberExceptionContext.java
* the License. */ package com.google.common.eventbus; import static com.google.common.base.Preconditions.checkNotNull; import java.lang.reflect.Method; /** * Context for an exception thrown by a subscriber. * * @since 16.0 */ public class SubscriberExceptionContext { private final EventBus eventBus; private final Object event; private final Object subscriber;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Sep 11 17:06:34 GMT 2025 - 2.2K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/Authenticate.java
.build(); }) .build(); } public void run() throws Exception { Request request = new Request.Builder() .url("http://publicobject.com/secrets/hellosecret.txt") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string());
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 1.9K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java
}; private final OkHttpClient client; public RewriteResponseCacheControl(File cacheDirectory) throws Exception { Cache cache = new Cache(cacheDirectory, 1024 * 1024); cache.evictAll(); client = new OkHttpClient.Builder() .cache(cache) .build(); } public void run() throws Exception { for (int i = 0; i < 5; i++) { System.out.println(" Request: " + i);
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jan 12 03:31:36 GMT 2019 - 2.6K bytes - Click Count (0)