Package ai.platon.pulsar.common
Object HtmlUtils
-
- All Implemented Interfaces:
public class HtmlUtils
-
-
Method Summary
Modifier and Type Method Description final StringBuilderreplaceHTMLCharset(String htmlContent, Pattern charsetPattern, String targetCharset)Replace the charset to the target charset final BooleanhasHtmlTags(String htmlContent)final BooleanhasHeadTags(String htmlContent)final BooleanhasBodyTags(String htmlContent)final BooleanisBlankBody(String htmlContent)final StringcreateIndexHtml(Path directory)Scan the directory, list all the files and create an index. final PathcreateIndexFile(Path directory)-
-
Method Detail
-
replaceHTMLCharset
final StringBuilder replaceHTMLCharset(String htmlContent, Pattern charsetPattern, String targetCharset)
Replace the charset to the target charset
-
hasHtmlTags
final Boolean hasHtmlTags(String htmlContent)
-
hasHeadTags
final Boolean hasHeadTags(String htmlContent)
-
hasBodyTags
final Boolean hasBodyTags(String htmlContent)
-
isBlankBody
final Boolean isBlankBody(String htmlContent)
-
createIndexHtml
final String createIndexHtml(Path directory)
Scan the directory, list all the files and create an index.html for all the files
- Parameters:
directory- the directory to scan- Returns:
the content of the index.html
-
createIndexFile
final Path createIndexFile(Path directory)
-
-
-
-