MCPcopy Create free account
hub / github.com/M66B/FairEmail / parse

Method parse

app/src/main/java/eu/faircode/email/JsoupEx.java:34–55  ·  view source on GitHub ↗
(String html)

Source from the content-addressed store, hash-verified

32
33public class JsoupEx {
34 static Document parse(String html) {
35 try {
36/*
37 org.jsoup.UncheckedIOException: java.io.IOException: Input is binary and unsupported
38 at org.jsoup.parser.CharacterReader.<init>(SourceFile:38)
39 at org.jsoup.parser.CharacterReader.<init>(SourceFile:43)
40 at org.jsoup.parser.TreeBuilder.initialiseParse(SourceFile:38)
41 at org.jsoup.parser.HtmlTreeBuilder.initialiseParse(SourceFile:65)
42 at org.jsoup.parser.TreeBuilder.parse(SourceFile:46)
43 at org.jsoup.parser.Parser.parse(SourceFile:107)
44 at org.jsoup.Jsoup.parse(SourceFile:58)
45*/
46 return Jsoup.parse(html.replace("\0", ""));
47 } catch (OutOfMemoryError ex) {
48 Log.e(ex);
49 Document document = Document.createShell("");
50 Element strong = document.createElement("strong");
51 strong.text(Log.formatThrowable(ex));
52 document.body().appendChild(strong);
53 return document;
54 }
55 }
56
57 static Document parse(InputStream stream, String charset, String baseUri) throws IOException {
58 try {

Callers 15

onExecuteMethod · 0.95
onExecuteMethod · 0.95
processMessageMethod · 0.95
onExecuteMethod · 0.95
onExecuteMethod · 0.95
onExecuteMethod · 0.95
sanitizeComposeMethod · 0.95
getFullTextMethod · 0.95
fromHtmlMethod · 0.95
toHtmlMethod · 0.95
onExecuteMethod · 0.95
isEmptyMethod · 0.95

Calls 5

eMethod · 0.95
formatThrowableMethod · 0.95
bodyMethod · 0.80
replaceMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected