@Test public void mediaTypeWithCharsetHeaderAndOtherParametersHeaderRepresentationIsValid() throws Exception { ImmutableMediaType sut = new ImmutableMediaType(MediaRangeSyntax.RFC6838, "type", "subtype", null, ImmutableMap.<String,String>builder().put("param","value").put("charset","\"UTF-8\"").build()); assertThat(sut.toHeader(),equalTo("type/subtype;charset=utf-8;param=value")); }
@Override public String toHeader() { return MediaTypes.toHeader(this); }
ImmutableMediaType implements MediaType { @Override public String toHeader() { return MediaTypes.toHeader(this); } }
ImmutableMediaType implements MediaType { @Override public String toHeader() { return MediaTypes.toHeader(this); } ImmutableMediaType(final MediaRangeSyntax syntax, final String type, final String subtype, String suffix, final Map<String, String> parameters); }
ImmutableMediaType implements MediaType { @Override public String toHeader() { return MediaTypes.toHeader(this); } ImmutableMediaType(final MediaRangeSyntax syntax, final String type, final String subtype, String suffix, final Map<String, String> parameters); @Override String type(); @Override String subType(); @Override Charset charset(); @Override String suffix(); @Override Map<String,String> parameters(); @Override boolean isWildcard(); @Override String toHeader(); @Override int hashCode(); @Override boolean equals(final Object other); @Override String toString(); }
ImmutableMediaType implements MediaType { @Override public String toHeader() { return MediaTypes.toHeader(this); } ImmutableMediaType(final MediaRangeSyntax syntax, final String type, final String subtype, String suffix, final Map<String, String> parameters); @Override String type(); @Override String subType(); @Override Charset charset(); @Override String suffix(); @Override Map<String,String> parameters(); @Override boolean isWildcard(); @Override String toHeader(); @Override int hashCode(); @Override boolean equals(final Object other); @Override String toString();  }