/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given input stream. */ private void parseFragment(InputStream in) throws IOException, SAXException { byte[] buffer = new byte[BUFFER_SIZE]; int length; while ((length = in.read(buffer)) != -1) { try { appendBytes(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } } }
/** * Indicate that we're finished parsing. * * @throws SAXException if the xml is incomplete */ /*package*/ void finish() throws SAXException { try { appendString(this.pointer, "", true); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Appends part of an XML document. This parser will parse the given XML to * the extent possible and dispatch to the appropriate methods. * * @param xml a whole or partial snippet of XML * @throws SAXException if an error occurs during parsing */ /*package*/ void append(String xml) throws SAXException { try { appendString(this.pointer, xml, false); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Appends part of an XML document. This parser will parse the given XML to * the extent possible and dispatch to the appropriate methods. * * @param xml a whole or partial snippet of XML * @param offset into the byte[] * @param length of bytes to use * @throws SAXException if an error occurs during parsing */ /*package*/ void append(byte[] xml, int offset, int length) throws SAXException { try { appendBytes(this.pointer, xml, offset, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Appends part of an XML document. This parser will parse the given XML to * the extent possible and dispatch to the appropriate methods. * * @param xml a whole or partial snippet of XML * @param offset into the char[] * @param length of characters to use * @throws SAXException if an error occurs during parsing */ /*package*/ void append(char[] xml, int offset, int length) throws SAXException { try { appendChars(this.pointer, xml, offset, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given input stream. */ private void parseFragment(InputStream in) throws IOException, SAXException { byte[] buffer = new byte[BUFFER_SIZE]; int length; while ((length = in.read(buffer)) != -1) { try { appendBytes(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } } }
/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given input stream. */ private void parseFragment(InputStream in) throws IOException, SAXException { byte[] buffer = new byte[BUFFER_SIZE]; int length; while ((length = in.read(buffer)) != -1) { try { appendBytes(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } } }
/** * Indicate that we're finished parsing. * * @throws SAXException if the xml is incomplete */ /*package*/ void finish() throws SAXException { try { appendString(this.pointer, "", true); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Indicate that we're finished parsing. * * @throws SAXException if the xml is incomplete */ /*package*/ void finish() throws SAXException { try { appendString(this.pointer, "", true); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Parses XML from the given Reader. */ private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { appendChars(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } }
/** * Parses XML from the given input stream. */ private void parseFragment(InputStream in) throws IOException, SAXException { byte[] buffer = new byte[BUFFER_SIZE]; int length; while ((length = in.read(buffer)) != -1) { try { appendBytes(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } } }
/** * Parses XML from the given input stream. */ private void parseFragment(InputStream in) throws IOException, SAXException { byte[] buffer = new byte[BUFFER_SIZE]; int length; while ((length = in.read(buffer)) != -1) { try { appendBytes(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } } }
/** * Indicate that we're finished parsing. * * @throws SAXException if the xml is incomplete */ /*package*/ void finish() throws SAXException { try { appendString(this.pointer, "", true); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }
/** * Indicate that we're finished parsing. * * @throws SAXException if the xml is incomplete */ /*package*/ void finish() throws SAXException { try { appendString(this.pointer, "", true); } catch (ExpatException e) { throw new ParseException(e.getMessage(), this.locator); } }