@Override protected final boolean isDocumentMatched( String reference, InputStream input, ImporterMetadata metadata, boolean parsed) throws ImporterHandlerException { String inputCharset = detectCharsetIfBlank( sourceCharset, reference, input, metadata, parsed); try { InputStreamReader is = new InputStreamReader(input, inputCharset); return isTextDocumentMatching(reference, is, metadata, parsed); } catch (UnsupportedEncodingException e) { throw new ImporterHandlerException(e); } }