Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 78 for adapter (0.04 sec)

  1. samples/slack/src/main/java/okhttp3/slack/SlackApi.java

        Request request = new Request.Builder()
            .url(url)
            .build();
        Call call = httpClient.newCall(request);
        try (Response response = call.execute()) {
          JsonAdapter<OAuthSession> jsonAdapter = moshi.adapter(OAuthSession.class);
          return jsonAdapter.fromJson(response.body().source());
        }
      }
    
      /** See https://api.slack.com/methods/rtm.start. */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jul 06 19:30:55 UTC 2018
    - 4.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/collection/EnumerationIterator.java

    import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull;
    
    import java.util.Enumeration;
    import java.util.Iterator;
    
    import org.codelibs.core.exception.ClUnsupportedOperationException;
    
    /**
     * Adapter to convert an {@link Enumeration} to an {@link Iterator}.
     *
     * @author shot
     * @param <T> the element type
     */
    public class EnumerationIterator<T> implements Iterator<T> {
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  3. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

              @FromJson fun byteStringFromJson(json: String) = json.decodeHex()
            },
          ).add(KotlinJsonAdapterFactory())
          .build()
      private val STORY_JSON_ADAPTER = MOSHI.adapter(Story::class.java)
    
      private val fileSystem = FileSystem.SYSTEM
    
      private fun readStory(source: BufferedSource): Story = STORY_JSON_ADAPTER.fromJson(source)!!
    
      private fun readStory(file: Path): Story {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

      /** Names leading to the current location in the ASN.1 document. */
      private val path = mutableListOf<String>()
    
      /**
       * False unless we made a recursive call to [write] at the current stack frame. The explicit box
       * adapter can clear this to synthesize non-constructed values that are embedded in octet strings.
       */
      var constructed = false
    
      fun write(
        name: String,
        tagClass: Int,
        tag: Long,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  5. guava/src/com/google/common/hash/ChecksumHashFunction.java

    import java.lang.invoke.MethodHandles;
    import java.lang.invoke.MethodType;
    import java.nio.ByteBuffer;
    import java.util.zip.Checksum;
    import org.jspecify.annotations.Nullable;
    
    /**
     * {@link HashFunction} adapter for {@link Checksum} instances.
     *
     * @author Colin Decker
     */
    @Immutable
    final class ChecksumHashFunction extends AbstractHashFunction implements Serializable {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

          .addInterceptor(new GzipRequestInterceptor())
          .build();
      private final Moshi moshi = new Moshi.Builder().build();
      private final JsonAdapter<Map<String, String>> mapJsonAdapter = moshi.adapter(
          Types.newParameterizedType(Map.class, String.class, String.class));
    
      public void run() throws Exception {
        Map<String, String> requestBody = new LinkedHashMap<>();
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 04 17:43:43 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/log/JclLoggerAdapter.java

     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.log;
    
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    
    /**
     * Logger adapter for Jakarta Commons Logging.
     *
     * @author koichik
     */
    class JclLoggerAdapter implements LoggerAdapter {
    
        protected final String sourceClass;
    
        protected final Log logger;
    
        /**
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/ParseResponseWithMoshi.java

    public final class ParseResponseWithMoshi {
      private final OkHttpClient client = new OkHttpClient();
      private final Moshi moshi = new Moshi.Builder().build();
      private final JsonAdapter<Gist> gistJsonAdapter = moshi.adapter(Gist.class);
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://api.github.com/gists/c2a7c39532239ff261be")
            .build();
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.8K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/log/JulLoggerAdapter.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.log;
    
    import java.util.logging.Level;
    
    /**
     * Adapter that uses java.util.logging loggers.
     *
     * @author koichik
     */
    class JulLoggerAdapter implements LoggerAdapter {
    
        protected final String sourceClass;
    
        protected final java.util.logging.Logger logger;
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  10. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

      private static final Moshi MOSHI = new Moshi.Builder().build();
      private static final JsonAdapter<List<Contributor>> CONTRIBUTORS_JSON_ADAPTER = MOSHI.adapter(
          Types.newParameterizedType(List.class, Contributor.class));
    
      static class Contributor {
        String login;
        int contributions;
      }
    
      public static void main(String... args) throws Exception {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top