org.custommonkey.xmlunit
public class DoctypeReader extends Reader
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
void | close()
Close the wrapped Reader |
protected String | getContent() |
int | read(char[] cbuf, int off, int len)
Read DOCTYPE-replaced content from the wrapped Reader |
String | replaceDoctype(StringBuffer withinContent, String doctypeName, String systemId)
Perform DOCTYPE amendment / addition within some marked-up content |
Parameters: originalSource doctypeName systemID
Throws: IOException
Returns: the content of the original source, without amendments or substitutions. Safe to call multiple times.
Throws: IOException if thrown while reading from the original source
Parameters: cbuf off len
Returns: The number of characters read, or -1 if the end of the stream has been reached
Throws: IOException
Parameters: withinContent doctypeName systemId
Returns: the content, after DOCTYPE amendment / addition