/src/main/java/org/htmlunit/util/EncodingSniffer.java
encoding = sniffEncodingFromUnicodeBom ( bytes ) ; if ( encoding != null ) { return encoding; }
throws IOException { Charset encoding = sniffEncodingFromHttpHeaders(headers); if (encoding != null || content == null) { return encoding; } byte[] bytes = read(content, 3); <extra_id_0> bytes = readAndPrepend(content, SIZE_OF_HTML_CONTENT_SNIFFED, bytes); encoding = sniffEncodingFromMetaTag(bytes); return encoding; } public static Charset sniffXmlEncoding(final List<NameValuePair> headers, final InputStream content) throws IOException {