|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.resource.XMLResource
public class XMLResource
XMLResource
XMLResource represent a source of wurfl repository backed by XML file. XML file can be root file or patch. The XML file can be compresses by gzip or zip. In case of zip, the first entry will be processed.
The given path can be URL or filesystem path. The URL support classpath scheme to load file from java classpath.
| Constructor Summary | |
|---|---|
XMLResource(File file)
Build resource by File. |
|
XMLResource(InputStream stream)
Build resource by InputStream. |
|
XMLResource(String path)
Build Resource by path. |
|
XMLResource(URI uri)
Build resource by URI. |
|
| Method Summary | |
|---|---|
static URI |
createURI(String path)
Creates a URI from the given String. |
ResourceData |
getData()
Return ResourceData representing the data contained by the resource. |
String |
getInfo()
Get info of this resource. |
boolean |
isReloadable()
Return if this resource can be reloaded. |
protected InputStream |
openInputStream(URI uri)
Opens the InputStream by giving URI. |
protected ResourceData |
readData(InputStream input)
Read the ResourceData from given stream. |
void |
release()
Release the resource. |
static URI |
toURI(String location)
Deprecated. use createURI(String) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLResource(String path)
path - The path of source file.public XMLResource(File file)
file - The source Filepublic XMLResource(URI uri)
uri - The source URIpublic XMLResource(InputStream stream)
stream - The source stream.| Method Detail |
|---|
public ResourceData getData()
getData in interface WURFLResourcepublic String getInfo()
getInfo in interface WURFLResourcepublic void release()
release in interface WURFLResourcepublic boolean isReloadable()
public static URI createURI(String path)
throws URISyntaxException
URISyntaxException
public static URI toURI(String location)
throws URISyntaxException
createURI(String)
location - Location to convert.
URISyntaxExceptionprotected InputStream openInputStream(URI uri)
uri - The given URI
protected ResourceData readData(InputStream input)
input - The stream to read data from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||