|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.utgenome.gwt.utgb.server.util.WebApplicationResource
public class WebApplicationResource
Helper class to retrieve web application resources contained in webapp folders (/), /WEB-INF, etc.
Constructor Summary | |
---|---|
WebApplicationResource(javax.servlet.ServletContext context)
|
Method Summary | |
---|---|
static ArrayList<String> |
find(javax.servlet.ServletContext context,
String basePath,
String fileNamePattern,
boolean recursive)
Retrieves web application resources from the ServletContext |
ArrayList<String> |
find(String basePath,
String fileNamePattern,
boolean recursive)
Retrieves web application resources from the ServletContext |
static String |
getContent(javax.servlet.ServletContext context,
String path)
|
static File |
getResoruceFile(javax.servlet.ServletContext context,
String path)
|
static BufferedReader |
openResource(javax.servlet.ServletContext context,
String path)
Gets a BufferedReader of the specified web application resource |
BufferedReader |
openResource(String path)
Gets a BufferedReader of the specified web application resource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebApplicationResource(javax.servlet.ServletContext context)
Method Detail |
---|
public ArrayList<String> find(String basePath, String fileNamePattern, boolean recursive)
basePath
- the resource path, which must begin with "/". For example, "/WEB-INF", "/" etc.fileNamePattern
- the file name patternrecursive
- when true, it recursively searches sub folders
public static ArrayList<String> find(javax.servlet.ServletContext context, String basePath, String fileNamePattern, boolean recursive)
context
- the servlet contextbasePath
- the resource path, which must begin with "/". For example, "/WEB-INF", "/" etc.fileNamePattern
- the file name patternrecursive
- when true, it recursively searches sub folders
public static BufferedReader openResource(javax.servlet.ServletContext context, String path) throws FileNotFoundException
BufferedReader
of the specified web application resource
context
- the servlet contextpath
- the resource path
BufferedReader
of the specified resource
FileNotFoundException
- when the specified resource is not foundpublic static File getResoruceFile(javax.servlet.ServletContext context, String path)
context
- the servlet contextpath
- the resource path, which must begin with "/"
public BufferedReader openResource(String path) throws FileNotFoundException
BufferedReader
of the specified web application resource
path
- the resource path
BufferedReader
of the specified resource
FileNotFoundException
- when the specified resource is not foundpublic static String getContent(javax.servlet.ServletContext context, String path) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |