|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.sun.rave.web.ui.util.IncludeInputStream
public class IncludeInputStream
This InputStream
looks for lines beginning with
"#include 'filename'" where filename is the name of a file to
include. It replaces the "#include" line with contents of the
specified file. Any other line beginning with '#' is illegal.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
IncludeInputStream(java.io.InputStream input)
Constructor. |
Method Summary | |
---|---|
int |
available()
|
protected java.lang.String |
convertRelativePath(java.lang.String filename)
This method converts a context-root relative path to the actual path using the ServletContext or PortletContext. |
static void |
main(java.lang.String[] args)
Simple test case (requires a test file). |
boolean |
markSupported()
|
int |
read()
This overriden method implements the include feature. |
int |
read(byte[] bytes,
int off,
int len)
|
Methods inherited from class java.io.FilterInputStream |
---|
close, mark, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IncludeInputStream(java.io.InputStream input)
Constructor.
Method Detail |
---|
public int read() throws java.io.IOException
This overriden method implements the include feature.
read
in class java.io.FilterInputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
public int read(byte[] bytes, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
protected java.lang.String convertRelativePath(java.lang.String filename)
This method converts a context-root relative path to the actual path using the ServletContext or PortletContext. This requires the application to be running in a Servlet or Portlet environment... and further requires that it be running in JSF environment (which is used to access the Servlet or Portlet Context).
filename
- The relative filename to convert to a full path.
public static void main(java.lang.String[] args)
Simple test case (requires a test file).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |