use of com.hippo.ehviewer.client.data.NormalPreviewSet in project EhViewer by seven332.
the class GalleryDetailParser method parseNormalPreviewSet.
/**
* Parse normal previews with regular expressions
*/
private static NormalPreviewSet parseNormalPreviewSet(String body) throws ParseException {
Matcher m = PATTERN_NORMAL_PREVIEW.matcher(body);
NormalPreviewSet normalPreviewSet = new NormalPreviewSet();
while (m.find()) {
normalPreviewSet.addItem(ParserUtils.parseInt(m.group(6)) - 1, ParserUtils.trim(m.group(3)), ParserUtils.parseInt((m.group(4))), 0, ParserUtils.parseInt(m.group(1)), ParserUtils.parseInt(m.group(2)), ParserUtils.trim(m.group(5)));
}
if (normalPreviewSet.size() == 0) {
throw new ParseException("Can't parse normal preview", body);
}
return normalPreviewSet;
}
Aggregations