/** * Return the character encoding used for this Response. */ public String getCharacterEncoding() { return coyoteResponse.getCharacterEncoding(); }
/** * {@inheritDoc} */ @Override public String getCharacterEncoding() { if (response == null) { throw new IllegalStateException("Null response object"); } return response.getCharacterEncoding(); }
/** * {@inheritDoc} */ @Override public String getCharacterEncoding() { if (response == null) { throw new IllegalStateException("Null response object"); } return response.getCharacterEncoding(); }
/** * {@inheritDoc} */ @Override public String getCharacterEncoding() { if (response == null) { throw new IllegalStateException("Null response object"); } return response.getCharacterEncoding(); }
/** * {@inheritDoc} */ @Override public String getCharacterEncoding() { if (response == null) { throw new IllegalStateException("Null response object"); } return response.getCharacterEncoding(); }
/** * {@inheritDoc} */ @Override public String getCharacterEncoding() { if (response == null) { throw new IllegalStateException("Null response object"); } return response.getCharacterEncoding(); }
/** * {@inheritDoc} */ @Override public String getCharacterEncoding() { if (response == null) { throw new IllegalStateException("Null response object"); } return response.getCharacterEncoding(); }
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
setCharacterEncoding(getCharacterEncoding());
/** * Writes content and content-type of resource file to response. * Tries to detect content type based on file extension. If can not detect => content-type is not set. * For now there are following bindings: * <ul> * <li>.xml => application/xml</li> * <li>.json => application/xml</li> * </ul> */ public static Action resourceContent(final String resourcePath) { return new Action(input -> { final HttpResponsePacket responsePacket = input.getResponse(); String encoding = responsePacket == null ? input.getCharacterEncoding() : responsePacket.getCharacterEncoding(); return resourceContent(resourcePath, encoding).apply(input); }); }