Reader reader = new StringReader(isis[i].getStyle()); StylesheetInfo info = isis[i].getInfo(); info.setUri(main.getUri()); Stylesheet is = parse(reader, info); info.setStylesheet(is); sheet.addStylesheet(info);
try { InputStream stream = new ByteArrayInputStream(isis[i].getStyle().getBytes("UTF-8")); StylesheetInfo info = isis[i].getInfo(); info.setUri(main.getUri()); Stylesheet is = parse(stream, info); info.setStylesheet(is); sheet.addStylesheet(info); } catch (UnsupportedEncodingException e) { e.printStackTrace(); }
    public Stylesheet parseInlines(InlineStyleInfo[] isis, StylesheetInfo main) {        Stylesheet sheet = new Stylesheet(main.getUri(), main.getOrigin());        if (isis != null) {            for (int i = 0; i < isis.length; i++) {                Reader reader = new StringReader(isis[i].getStyle());                StylesheetInfo info = isis[i].getInfo();                info.setUri(main.getUri());                Stylesheet is = parse(reader, info);                info.setStylesheet(is);                sheet.addStylesheet(info);            }        }        return sheet;    }