|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Reader | +--org.enhydra.xml.xmlc.misc.SSIReader
A reader that implements Server-Side Includes (SSI). This used the syntax defined by Apache mod_include, however it only implements the `include' directive.
This input stream automatically closes on reaching EOF.
Inner Class Summary | |
class |
SSIReader.Listener
Listener for SSI open/close events. |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
SSIReader(InputSource source,
String ssiBase)
Construct a new reader for the specified file. |
Method Summary | |
void |
close()
Close the stream. |
static InputSource |
create(InputSource inputSource,
String ssiBase)
Construct an InputSource containing an SSI Reader. |
LineNumberMap |
getLineNumberMap()
Get the line number map. |
String |
getSystemId()
Get the system id of the currently opened file. |
int |
read()
Read a character. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
Methods inherited from class java.io.Reader |
mark, markSupported, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public SSIReader(InputSource source, String ssiBase) throws IOException
Method Detail |
public String getSystemId()
public int read() throws IOException
read
in class Reader
public int read(char[] cbuf, int off, int len) throws IOException
read
in class Reader
IOException
- If an I/O error occursFilterReader.read()
public void close() throws IOException
close
in class Reader
IOException
- If an I/O error occurspublic final LineNumberMap getLineNumberMap()
public static InputSource create(InputSource inputSource, String ssiBase) throws IOException
Note: does not wrap SSI Reader in ClosingInputSource, as is common in other cases to guarantee that no file handles will be left open (on Windows). The reason is so consumers can access the unwrapped reader in order to obtain the LineNumberMap. Fortunately, experimentation shows that wrapping in this case is unnecessary; not even by downstream consumers.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |