- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 75 for MediaType (0.06 sec)
-
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; } private static MediaType addKnownType(MediaType mediaType) { KNOWN_TYPES.put(mediaType, mediaType); return mediaType; } /* * The following constants are grouped by their type and ordered alphabetically by the constant
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Sep 26 19:15:09 UTC 2024 - 47.5K bytes - Viewed (0) -
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/net/MediaTypeTest.java
MediaType.parse("text/plain; a=1; a=2").withParameter("a", "3")); assertEquals( MediaType.parse("text/plain; a=1; a=2; b=3"), MediaType.parse("text/plain; a=1; a=2").withParameter("b", "3")); } public void testWithParameter_invalidAttribute() { MediaType mediaType = MediaType.parse("text/plain");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 20.4K bytes - Viewed (0) -
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.5K bytes - Viewed (0) -
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: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 2.9K bytes - Viewed (0) -
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K bytes - Viewed (0) -
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: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 4.6K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
String contentType = response.header("Content-Type"); if (responseCode != 200 || contentType == null) { return; } MediaType mediaType = MediaType.parse(contentType); if (mediaType == null || !mediaType.subtype().equalsIgnoreCase("html")) { return; } Document document = Jsoup.parse(response.body().string(), url.toString());
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 4.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
*/ package okhttp3.recipes; import java.io.File; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public final class PostFile { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.5K bytes - Viewed (0)