Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for MediaType (0.14 sec)

  1. src/mime/mediatype.go

    // attribute to the attribute value with its case preserved.
    func ParseMediaType(v string) (mediatype string, params map[string]string, err error) {
    	base, _, _ := strings.Cut(v, ";")
    	mediatype = strings.TrimSpace(strings.ToLower(base))
    
    	err = checkMediaTypeDisposition(mediatype)
    	if err != nil {
    		return "", nil, err
    	}
    
    	params = make(map[string]string)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/MediaType.kt

          replaceWith =
            ReplaceWith(
              expression = "mediaType.toMediaType()",
              imports = ["okhttp3.MediaType.Companion.toMediaType"],
            ),
          level = DeprecationLevel.ERROR,
        )
        fun get(mediaType: String): MediaType = mediaType.toMediaType()
    
        @JvmName("-deprecated_parse")
        @Deprecated(
          message = "moved to extension function",
          replaceWith =
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/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() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

    package okhttp3.internal
    
    import okhttp3.MediaType
    
    internal fun MediaType.commonParameter(name: String): String? {
      for (i in parameterNamesAndValues.indices step 2) {
        if (parameterNamesAndValues[i].equals(name, ignoreCase = true)) {
          return parameterNamesAndValues[i + 1]
        }
      }
      return null
    }
    
    internal fun MediaType.commonEquals(other: Any?): Boolean = other is MediaType && other.mediaType == mediaType
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/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)
        }
      }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/util/SearchEngineUtil.java

        private SearchEngineUtil() {
        }
    
        public static OutputStream getXContentBuilderOutputStream(final XContentBuilderCallback func, final MediaType mediaType) {
            try (final XContentBuilder builder = func.apply(mediaType.contentBuilder(), ToXContent.EMPTY_PARAMS)) {
                builder.flush();
                return builder.getOutputStream();
            } catch (final IOException e) {
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  7. 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);
    Registered: Wed Jun 12 15:17:51 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go

    func NegotiateInputSerializerForMediaType(mediaType string, streaming bool, ns runtime.NegotiatedSerializer) (runtime.SerializerInfo, error) {
    	mediaTypes := ns.SupportedMediaTypes()
    	if len(mediaType) == 0 {
    		mediaType = mediaTypes[0].MediaType
    	}
    	if mediaType, _, err := mime.ParseMediaType(mediaType); err == nil {
    		if info, ok := runtime.SerializerInfoForMediaType(mediaTypes, mediaType); ok {
    			return info, nil
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 10 10:53:34 UTC 2019
    - 9.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt

    }
    
    internal fun ResponseBody.commonClose() = source().closeQuietly()
    
    internal fun ByteArray.commonToResponseBody(contentType: MediaType?): ResponseBody {
      return Buffer()
        .write(this)
        .asResponseBody(contentType, size.toLong())
    }
    
    internal fun ByteString.commonToResponseBody(contentType: MediaType?): ResponseBody {
      return Buffer()
        .write(this)
        .asResponseBody(contentType, size.toLong())
    }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/internal.kt

        cipherSuitesAsString.intersect(socketEnabledCipherSuites, CipherSuite.ORDER_BY_NAME)
      } else {
        socketEnabledCipherSuites
      }
    }
    
    internal fun MediaType?.chooseCharset(): Pair<Charset, MediaType?> {
      var charset: Charset = Charsets.UTF_8
      var finalContentType: MediaType? = this
      if (this != null) {
        val resolvedCharset = this.charset()
        if (resolvedCharset == null) {
          charset = Charsets.UTF_8
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
Back to top