org.enhydra.xml.xmlc.misc
Class SSIReader
java.lang.Object
|
+--java.io.Reader
|
+--org.enhydra.xml.xmlc.misc.SSIReader
- public final class SSIReader
- extends Reader
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.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSIReader
public SSIReader(InputSource source,
String ssiBase)
throws IOException
- Construct a new reader for the specified file.
getSystemId
public String getSystemId()
- Get the system id of the currently opened file.
read
public int read()
throws IOException
- Read a character.
- Overrides:
read
in class Reader
- Returns:
- The character, -1 if no more characters are available.
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Read characters into a portion of an array. To simplify the
handling of an SSI directive, a directive is only processed if
it's at the start of the buffer. SSIs in the middle of the
read result in a partial read.
- Overrides:
read
in class Reader
- Throws:
IOException
- If an I/O error occurs- See Also:
FilterReader.read()
close
public void close()
throws IOException
- Close the stream.
- Overrides:
close
in class Reader
- Throws:
IOException
- If an I/O error occurs
getLineNumberMap
public final LineNumberMap getLineNumberMap()
- Get the line number map.
create
public static InputSource create(InputSource inputSource,
String ssiBase)
throws IOException
- Construct an InputSource containing an SSI reader.
Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.