public class DoctypeReader
extends java.io.Reader
Modifier and Type | Field and Description |
---|---|
private java.io.BufferedReader |
originalReader |
private java.lang.StringBuilder |
sourceBuilder |
private DoctypeSupport |
support |
Constructor and Description |
---|
DoctypeReader(java.io.Reader originalSource,
java.lang.String doctypeName,
java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected java.lang.String |
getContent() |
private java.lang.StringBuilder |
getContent(java.io.BufferedReader originalSource) |
int |
read()
Read DOCTYPE-replaced content from the wrapped Reader
|
int |
read(char[] cbuf,
int off,
int len)
Read DOCTYPE-replaced content from the wrapped Reader
|
private final java.io.BufferedReader originalReader
private final java.lang.StringBuilder sourceBuilder
private final DoctypeSupport support
public DoctypeReader(java.io.Reader originalSource, java.lang.String doctypeName, java.lang.String systemID)
originalSource
- doctypeName
- systemID
- protected java.lang.String getContent() throws java.io.IOException
java.io.IOException
- if thrown while reading from the original sourceprivate java.lang.StringBuilder getContent(java.io.BufferedReader originalSource) throws java.io.IOException
originalSource
- java.io.IOException
- if thrown while reading from the original sourcepublic int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
cbuf
- off
- len
- java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
java.io.IOException