| java.lang.Object java.io.Reader org.custommonkey.xmlunit.DoctypeReader
DoctypeReader | public class DoctypeReader extends Reader (Code) | | Adapts the marked-up content in a source Reader to specify that it
conforms to a different DTD.
Combines Reader semantics with the ability to specify a target doctype
for a character stream containing XML markup.
Used by Validator class to wrap a Reader when performing validation of a
document against a DTD.
Examples and more at xmlunit.sourceforge.net
|
Constructor Summary | |
public | DoctypeReader(Reader originalSource, String doctypeName, String systemID) Create a Reader whose XML content is provided by the originalSource with
the exception of the DOCTYPE which is provided by the doctypeName
and systemID. |
DoctypeReader | public DoctypeReader(Reader originalSource, String doctypeName, String systemID)(Code) | | Create a Reader whose XML content is provided by the originalSource with
the exception of the DOCTYPE which is provided by the doctypeName
and systemID.
Parameters: originalSource - Parameters: doctypeName - Parameters: systemID - |
getContent | protected String getContent() throws IOException(Code) | | the content of the original source, without amendments orsubstitutions. Safe to call multiple times. throws: IOException - if thrown while reading from the original source |
read | public int read(char cbuf, int off, int len) throws IOException(Code) | | Read DOCTYPE-replaced content from the wrapped Reader
Parameters: cbuf - Parameters: off - Parameters: len - The number of characters read, or -1 if the end of thestream has been reached throws: IOException - |
read | public int read() throws IOException(Code) | | Read DOCTYPE-replaced content from the wrapped Reader
|
replaceDoctype | public String replaceDoctype(StringBuffer withinContent, String doctypeName, String systemId)(Code) | | Perform DOCTYPE amendment / addition within some marked-up content
Parameters: withinContent - Parameters: doctypeName - Parameters: systemId - the content, after DOCTYPE amendment / addition |
|
|