Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 77 for MediaType (0.07 seconds)

  1. guava/src/com/google/common/net/MediaType.java

        MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS));
        mediaType.parsedCharset = Optional.of(UTF_8);
        return mediaType;
      }
    
      @CanIgnoreReturnValue
      private static MediaType addKnownType(MediaType mediaType) {
        knownTypes.put(mediaType, mediaType);
        return mediaType;
      }
    
      /*
       * The following constants are grouped by their type and ordered alphabetically by the constant
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Oct 02 01:46:40 GMT 2025
    - 48K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/net/MediaType.java

        MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS));
        mediaType.parsedCharset = Optional.of(UTF_8);
        return mediaType;
      }
    
      @CanIgnoreReturnValue
      private static MediaType addKnownType(MediaType mediaType) {
        knownTypes.put(mediaType, mediaType);
        return mediaType;
      }
    
      /*
       * The following constants are grouped by their type and ordered alphabetically by the constant
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Oct 02 01:46:40 GMT 2025
    - 48K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/MediaType.kt

       * Content-Type header.
       */
      override fun toString(): String = mediaType
    
      override fun equals(other: Any?): Boolean = other is MediaType && other.mediaType == mediaType
    
      override fun hashCode(): Int = mediaType.hashCode()
    
      companion object {
        private const val TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)"
        private const val QUOTED = "\"([^\"]*)\""
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue May 27 14:51:08 GMT 2025
    - 5.9K bytes
    - Click Count (0)
  4. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

     */
    package okhttp3.recipes;
    
    import java.io.IOException;
    import okhttp3.MediaType;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    import okio.BufferedSink;
    
    public final class PostStreaming {
      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
      private final OkHttpClient client = new OkHttpClient();
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Click Count (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/MediaTypeTest.kt

        assertEquals("2", mediaType.parameter("b"))
        assertEquals("3", mediaType.parameter("c"))
        assertEquals("utf-8", mediaType.parameter("CHARSET"))
        assertEquals("1", mediaType.parameter("A"))
        assertEquals("2", mediaType.parameter("B"))
        assertEquals("3", mediaType.parameter("C"))
      }
    
      @Test fun testCharsetAndQuoting() {
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 7.5K bytes
    - Click Count (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/MediaTypeJvmTest.kt

        withLocale(Locale("en", "US")) {
          val mediaType = parse("IMAGE/JPEG")
          assertEquals("image", mediaType.type)
          assertEquals("jpeg", mediaType.subtype)
        }
      }
    
      @Test fun testTurkishDotlessIWithTrTr() {
        withLocale(Locale("tr", "TR")) {
          val mediaType = parse("IMAGE/JPEG")
          assertEquals("image", mediaType.type)
          assertEquals("jpeg", mediaType.subtype)
        }
      }
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 3K bytes
    - Click Count (0)
  7. src/main/java/org/codelibs/fess/util/SearchEngineUtil.java

         * @param mediaType the media type for the content builder
         * @return an OutputStream containing the built content, or an empty ByteArrayOutputStream if an error occurs
         */
        public static OutputStream getXContentBuilderOutputStream(final XContentBuilderCallback func, final MediaType mediaType) {
            try (final XContentBuilder builder = func.apply(mediaType.contentBuilder(), ToXContent.EMPTY_PARAMS)) {
    Created: Sat Dec 20 09:19:18 GMT 2025
    - Last Modified: Thu Jul 17 08:28:31 GMT 2025
    - 5.1K bytes
    - Click Count (0)
  8. okhttp/api/jvm/okhttp.api

    	public static final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 70.2K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyJvmTest.kt

      companion object {
        @JvmOverloads
        fun body(
          hex: String,
          charset: String? = null,
        ): ResponseBody {
          val mediaType = if (charset == null) null else "any/thing; charset=$charset".toMediaType()
          return hex.decodeHex().toResponseBody(mediaType)
        }
    
        fun exhaust(reader: Reader): String {
          val builder = StringBuilder()
          val buf = CharArray(10)
          var read: Int
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 12.4K bytes
    - Click Count (0)
  10. fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/impl/MimeTypeHelperImpl.java

            try {
                if (useFilename) {
                    final MediaType mediaType = mimeTypes.detect(null, metadata);
                    if (!MediaType.OCTET_STREAM.equals(mediaType)) {
                        return mediaType.getType() + "/" + mediaType.getSubtype();
                    }
                }
    
                final MediaType mediaType = mimeTypes.detect(is == null || is.markSupported() ? is : new BufferedInputStream(is), metadata);
    Created: Sat Dec 20 11:21:39 GMT 2025
    - Last Modified: Sun Nov 23 12:19:14 GMT 2025
    - 6.6K bytes
    - Click Count (0)
Back to Top