- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 52 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; } @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
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 48K bytes - Viewed (0) -
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
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 48K bytes - Viewed (0) -
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 = "\"([^\"]*)\""
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:51:08 UTC 2025 - 5.9K bytes - Viewed (0) -
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)) {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 5.1K bytes - Viewed (0) -
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;
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
@JvmName("create") fun String.toRequestBody(contentType: MediaType? = null): RequestBody { val (charset, finalContentType) = contentType.chooseCharset() val bytes = toByteArray(charset) return bytes.toRequestBody(finalContentType, 0, bytes.size) } @JvmStatic @JvmName("create") fun ByteString.toRequestBody(contentType: MediaType? = null): RequestBody = object : RequestBody() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt
import okio.Source import okio.buffer class ResponseBodyTest { @Test fun sourceEmpty() { val mediaType = if (null == null) null else "any/thing; charset=${null}".toMediaType() val body = "".decodeHex().toResponseBody(mediaType) val source = body.source() assertThat(source.exhausted()).isTrue() assertThat(source.readUtf8()).isEqualTo("") } @Test fun sourceClosesUnderlyingSource() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
} @Test fun mediaType() { val mediaType: MediaType = "".toMediaType() val defaultCharset: Charset? = mediaType.charset() val charset: Charset? = mediaType.charset(Charsets.UTF_8) val type: String = mediaType.type val subtype: String = mediaType.subtype val parse: MediaType? = "".toMediaTypeOrNull() } @Test fun mockResponse() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 20.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt
@JvmName("create") fun ByteArray.toResponseBody(contentType: MediaType? = null): ResponseBody = Buffer() .write(this) .asResponseBody(contentType, size.toLong()) /** Returns a new response body that transmits this byte string. */ @JvmStatic @JvmName("create") fun ByteString.toResponseBody(contentType: MediaType? = null): ResponseBody = Buffer() .write(this)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:51:25 UTC 2025 - 11.6K bytes - Viewed (0)