/** * * @see org.apache.wicket.markup.parser.IXmlPullParser#getEncoding() */ public String getEncoding() { return xmlReader.getEncoding(); }
/** * * @see org.apache.wicket.markup.parser.IXmlPullParser#getEncoding() */ public String getEncoding() { return xmlReader.getEncoding(); }
/** * Reads and parses markup from an input stream. * <p> * Note: The input is closed after parsing. * * @param inputStream * The input stream to read and parse * @param encoding * The default character encoding of the input * @throws IOException */ @Override public void parse(final InputStream inputStream, final String encoding) throws IOException { Args.notNull(inputStream, "inputStream"); try { XmlReader xmlReader = new XmlReader(new BufferedInputStream(inputStream, 4000), encoding); this.input = new FullyBufferedReader(xmlReader); this.encoding = xmlReader.getEncoding(); } finally { IOUtils.closeQuietly(inputStream); } }
/** * Reads and parses markup from an input stream. * <p> * Note: The input is closed after parsing. * * @param inputStream * The input stream to read and parse * @param encoding * The default character encoding of the input * @throws IOException */ @Override public void parse(final InputStream inputStream, final String encoding) throws IOException { Args.notNull(inputStream, "inputStream"); try { XmlReader xmlReader = new XmlReader(new BufferedInputStream(inputStream, 4000), encoding); this.input = new FullyBufferedReader(xmlReader); this.encoding = xmlReader.getEncoding(); } finally { IOUtils.closeQuietly(inputStream); } }