Reader reader = null;
try {
reader = new InputStreamReader(new FileInputStream(file),
Utils.SYSTEM_CHARSET);
Page page = fpp.parse(Utils.readAllChars(reader));
reader.close();
String title = page.getTitle();
if (Utils.isNullOrWhitespace(title)) {
title = Utils.beautify(Utils.removeExtension(path), true);
}
pageInfo.setTitle(title);
pageInfo.setLastModified(file.lastModified());
String keywords = page.getProperty("meta.keywords");
if (!Utils.isNullOrEmpty(keywords)) {
Matcher matcher = KEYWORDS_REGEX.matcher(keywords);
List list = new ArrayList();
while (matcher.find()) {
list.add(matcher.group());
}
if (list.size() > 0) {
pageInfo.setKeywords((String[]) list.toArray(new String[list.size()]));
}
}
if (excerptLength > 0) {
pageInfo.setExcerpt(Utils.limitedLength(Utils.stripHTMLTags
(page.getBody()), excerptLength));
} else {
pageInfo.setExcerpt("");
}
/*