public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
public void setDocumentLocator(Locator locator) { _location.setLocator(locator); }
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); }
/** * 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); }
/** * Return the current location within the source file. */ protected String currentLocation() { return " [" + _loc.get("loc-prefix") + _location.getLocation() + "]"; }
/** * Add current comments to the given entity. By default, assumes entity * is {@link Commentable}. */ protected void addComments(Object obj) { String[] comments = currentComments(); if (comments.length > 0 && obj instanceof Commentable) ((Commentable) obj).setComments(comments); }
public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
public void setDocumentLocator(Locator locator) { _location.setLocator(locator); }
/** * 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); }
/** * Add current comments to the given entity. By default, assumes entity * is {@link Commentable}. */ protected void addComments(Object obj) { String[] comments = currentComments(); if (comments.length > 0 && obj instanceof Commentable) ((Commentable) obj).setComments(comments); }
public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
public void setDocumentLocator(Locator locator) { _location.setLocator(locator); }
/** * 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 void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public int read(char[] buf) throws IOException { return read(buf, 0, buf.length); }
public void setDocumentLocator(Locator locator) { _location.setLocator(locator); }
/** * 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); }