Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for withCharset (0.04 seconds)

  1. guava-tests/test/com/google/common/net/MediaTypeTest.java

      }
    
      public void testWithCharset() {
        assertThat(MediaType.parse("text/plain").withCharset(UTF_8))
            .isEqualTo(MediaType.parse("text/plain; charset=utf-8"));
        assertThat(MediaType.parse("text/plain; charset=utf-16").withCharset(UTF_8))
            .isEqualTo(MediaType.parse("text/plain; charset=utf-8"));
      }
    
      public void testHasWildcard() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 16:11:48 GMT 2026
    - 20.4K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/net/MediaType.java

       */
      public MediaType withCharset(Charset charset) {
        checkNotNull(charset);
        MediaType withCharset = withParameter(CHARSET_ATTRIBUTE, charset.name());
        // precache the charset so we don't need to parse it
        withCharset.parsedCharset = Optional.of(charset);
        return withCharset;
      }
    
      /** Returns true if either the type or subtype is the wildcard. */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Oct 02 01:46:40 GMT 2025
    - 48K bytes
    - Click Count (0)
Back to Top