@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument() throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (document == null) document = getDocument(getAbdera().getParser()); return (Document<T>)document; }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument(ParserOptions options) throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (document == null) document = getDocument(getAbdera().getParser(), options); return (Document<T>)document; }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument(Parser parser) throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (parser == null) parser = getAbdera().getParser(); if (parser == null) throw new IllegalArgumentException("No Parser implementation was provided"); if (document == null) document = getDocument(parser, parser.getDefaultParserOptions()); return (Document<T>)document; }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument(Parser parser, ParserOptions options) throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (parser == null) parser = getAbdera().getParser(); if (parser == null) throw new IllegalArgumentException("No Parser implementation was provided"); if (document == null) { document = parser.parse(getInputStream(), getResolvedUri().toString(), options); } return (Document<T>)document; }