/src/main/java/org/htmlunit/util/EncodingSniffer.java
return encoding; if ( encoding != null) {encoding = sniffEncodingFromUnicodeBom( bytes) ;
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_XML_CONTENT_SNIFFED, bytes); encoding = sniffEncodingFromXmlDeclaration(bytes); return encoding; } public static Charset sniffUnknownContentTypeEncoding(final List<NameValuePair> headers, final InputStream content)