/** * Construct the reader with an XML stream, and set the * <code>DOCTYPE</code> information to be included. The given * reader should access an input source containing the exact declaration * to include, such as:<br /> * <code><DOCTYPE schedule SYSTEM "schedule.dtd"></code><br /> * <code><DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...></code><br /> * <code><DOCTYPE stock-price [ <ELEMENT symb ... ]></code><br /> * If the reader is null, no <code>DOCTYPE</code> information will be * included in the stream. */ public DocTypeReader(Reader xml, Reader docType) throws IOException { _docType = docType; _xml = bufferHeader(xml); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
public int read() throws IOException { int ch = readHeader(); if (ch != -1) return ch; ch = readDocType(); if (ch != -1) return ch; return _xml.read(); }
schema = schemaSource; if (schema == null && getDocType() != null) xml = new DocTypeReader(xml, getDocType());
writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); return headerOnly(writer.toString()); writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); xml.unread(ch);
schema = schemaSource; if (schema == null && getDocType() != null) xml = new DocTypeReader(xml, getDocType());
writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); return headerOnly(writer.toString()); writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); xml.unread(ch);
public int read(char[] buf, int off, int len) throws IOException { int headerRead = readHeader(buf, off, len); off += headerRead; len -= headerRead; int docRead = readDocType(buf, off, len); off += docRead; len -= docRead; return headerRead + docRead + _xml.read(buf, off, len); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
/** * Construct the reader with an XML stream, and set the * <code>DOCTYPE</code> information to be included. The given * reader should access an input source containing the exact declaration * to include, such as:<br /> * <code><DOCTYPE schedule SYSTEM "schedule.dtd"></code><br /> * <code><DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...></code><br /> * <code><DOCTYPE stock-price [ <ELEMENT symb ... ]></code><br /> * If the reader is null, no <code>DOCTYPE</code> information will be * included in the stream. */ public DocTypeReader(Reader xml, Reader docType) throws IOException { _docType = docType; _xml = bufferHeader(xml); }
schema = schemaSource; if (schema == null && getDocType() != null) xml = new DocTypeReader(xml, getDocType());
writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); return headerOnly(writer.toString()); writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); xml.unread(ch);
public int read() throws IOException { int ch = readHeader(); if (ch != -1) return ch; ch = readDocType(); if (ch != -1) return ch; return _xml.read(); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
/** * Construct the reader with an XML stream, and set the * <code>DOCTYPE</code> information to be included. The given * reader should access an input source containing the exact declaration * to include, such as:<br /> * <code><DOCTYPE schedule SYSTEM "schedule.dtd"></code><br /> * <code><DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...></code><br /> * <code><DOCTYPE stock-price [ <ELEMENT symb ... ]></code><br /> * If the reader is null, no <code>DOCTYPE</code> information will be * included in the stream. */ public DocTypeReader(Reader xml, Reader docType) throws IOException { _docType = docType; _xml = bufferHeader(xml); }
schema = schemaSource; if (schema == null && getDocType() != null) xml = new DocTypeReader(xml, getDocType());
writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); return headerOnly(writer.toString()); writer.write(ch); if (ch == -1) return headerOnly(writer.toString()); xml.unread(ch);
public int read(char[] buf, int off, int len) throws IOException { int headerRead = readHeader(buf, off, len); off += headerRead; len -= headerRead; int docRead = readDocType(buf, off, len); off += docRead; len -= docRead; return headerRead + docRead + _xml.read(buf, off, len); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
/** * Construct the reader with an XML stream, and set the * <code>DOCTYPE</code> information to be included. The given * reader should access an input source containing the exact declaration * to include, such as:<br /> * <code><DOCTYPE schedule SYSTEM "schedule.dtd"></code><br /> * <code><DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...></code><br /> * <code><DOCTYPE stock-price [ <ELEMENT symb ... ]></code><br /> * If the reader is null, no <code>DOCTYPE</code> information will be * included in the stream. */ public DocTypeReader(Reader xml, Reader docType) throws IOException { _docType = docType; _xml = bufferHeader(xml); }