@Test public void testGetFullContentType() throws Exception { Result result = Results.ok().json(); assertThat(result.getFullContentType()).contains(MimeTypes.JSON).contains(Charsets.UTF_8.toString()); result = Results.ok().as(MimeTypes.BINARY); assertThat(result.getFullContentType()).contains(MimeTypes.BINARY).doesNotContain(Charsets.UTF_8.toString()); }
public String getFullContentType() { if (getContentType() == null) { return null; } Charset localCharset = getCharset(); if (localCharset == null || getContentType().contains("charset")) { return getContentType(); } else { return getContentType() + "; charset=" + localCharset.displayName(); } }
Result implements Status { public String getFullContentType() { if (getContentType() == null) { return null; } Charset localCharset = getCharset(); if (localCharset == null || getContentType().contains("charset")) { return getContentType(); } else { return getContentType() + "; charset=" + localCharset.displayName(); } } }
Result implements Status { public String getFullContentType() { if (getContentType() == null) { return null; } Charset localCharset = getCharset(); if (localCharset == null || getContentType().contains("charset")) { return getContentType(); } else { return getContentType() + "; charset=" + localCharset.displayName(); } } Result(int statusCode);  Result(); }
Result implements Status { public String getFullContentType() { if (getContentType() == null) { return null; } Charset localCharset = getCharset(); if (localCharset == null || getContentType().contains("charset")) { return getContentType(); } else { return getContentType() + "; charset=" + localCharset.displayName(); } } Result(int statusCode);  Result(); Renderable<?> getRenderable(); Result render(Renderable<?> renderable); Result render(Object object); Result render(JsonNode node); Result render(String padding, JsonNode node); Result render(Document document); Result render(String content); Result render(CharSequence content); Result render(StringBuilder content); Result render(StringBuffer content); String getContentType(); Charset getCharset(); Result with(Charset charset); String getFullContentType(); Result as(String contentType); Map<String, String> getHeaders(); Result with(String headerName, String headerContent); Cookie getCookie(String cookieName); List<Cookie> getCookies(); Result with(Cookie cookie); Result without(String name); Result withoutCompression(); Result discard(String name); Result discard(String... names); int getStatusCode(); Result status(int statusCode); Result redirect(String url); Result redirectTemporary(String url); Result html(); Result json(); Result xml(); Result noCache(); Result noContentIfNone(); Result addToSession(String key, String value); Result addToFlash(String key, String value); }
Result implements Status { public String getFullContentType() { if (getContentType() == null) { return null; } Charset localCharset = getCharset(); if (localCharset == null || getContentType().contains("charset")) { return getContentType(); } else { return getContentType() + "; charset=" + localCharset.displayName(); } } Result(int statusCode);  Result(); Renderable<?> getRenderable(); Result render(Renderable<?> renderable); Result render(Object object); Result render(JsonNode node); Result render(String padding, JsonNode node); Result render(Document document); Result render(String content); Result render(CharSequence content); Result render(StringBuilder content); Result render(StringBuffer content); String getContentType(); Charset getCharset(); Result with(Charset charset); String getFullContentType(); Result as(String contentType); Map<String, String> getHeaders(); Result with(String headerName, String headerContent); Cookie getCookie(String cookieName); List<Cookie> getCookies(); Result with(Cookie cookie); Result without(String name); Result withoutCompression(); Result discard(String name); Result discard(String... names); int getStatusCode(); Result status(int statusCode); Result redirect(String url); Result redirectTemporary(String url); Result html(); Result json(); Result xml(); Result noCache(); Result noContentIfNone(); Result addToSession(String key, String value); Result addToFlash(String key, String value);  }