@Override public String getResponseHeader(String headerName) { return delegate.getResponseHeader(headerName); }
/** * @throws IOException * @throws ServiceException */ public WFSResponse(WFSRequest originatingRequest, final HTTPResponse httpResponse) throws ServiceException, IOException { super(httpResponse); this.request = originatingRequest; String charset = httpResponse.getResponseHeader("Charset"); if (charset == null) { this.charset = Charset.forName("UTF-8"); } else { try { this.charset = Charset.forName(charset); } catch (Exception e) { // TODO log this.charset = Charset.forName("UTF-8"); } } this.contentType = httpResponse.getContentType(); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("WFS response: charset=" + charset + ", contentType=" + contentType); } }
String charset = response.getResponseHeader("Charset"); try { Charset.forName(charset);
/** * @throws IOException * @throws ServiceException */ public WFSResponse(WFSRequest originatingRequest, final HTTPResponse httpResponse) throws ServiceException, IOException { super(httpResponse); this.request = originatingRequest; String charset = httpResponse.getResponseHeader("Charset"); if (charset == null) { this.charset = Charset.forName("UTF-8"); } else { try { this.charset = Charset.forName(charset); } catch (Exception e) { // TODO log this.charset = Charset.forName("UTF-8"); } } this.contentType = httpResponse.getContentType(); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("WFS response: charset=" + charset + ", contentType=" + contentType); } }
String charset = response.getResponseHeader("Charset"); try { Charset.forName(charset);