|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.common.xml.MCRXMLResource
public class MCRXMLResource
provides a cache for reading XML resources.
Cache size can be configured by property
MCR.MCRXMLResouce.Cache.Size which defaults to 100.
| Method Summary | |
|---|---|
boolean |
exists(String name,
ClassLoader classLoader)
|
long |
getLastModified(String name,
ClassLoader classLoader)
|
byte[] |
getRawResource(String name)
returns xml as byte array using ClassLoader of MCRXMLResource class |
byte[] |
getRawResource(String name,
ClassLoader classLoader)
Returns raw XML resource as byte array. |
Document |
getResource(String name)
Returns JDOM Document using ClassLoader of MCRXMLResource class |
Document |
getResource(String name,
ClassLoader classLoader)
Returns parsed XML resource as JDOM Document. |
static MCRXMLResource |
instance()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MCRXMLResource instance()
public Document getResource(String name)
throws IOException,
JDOMException
name - resource name
IOException
JDOMExceptiongetResource(String, ClassLoader)
public byte[] getRawResource(String name)
throws IOException
name - resource name
IOExceptiongetRawResource(String, ClassLoader)
public Document getResource(String name,
ClassLoader classLoader)
throws IOException,
JDOMException
name - the resource nameclassLoader - a ClassLoader that should be used to locate the resource
null if the
resource is not found
IOException - if resource cannot be loaded
JDOMException - if resource cannot be parsed
public byte[] getRawResource(String name,
ClassLoader classLoader)
throws IOException
name - the resource nameclassLoader - a ClassLoader that should be used to locate the resource
null if the
resource is not found
IOException - if resource cannot be loaded
public long getLastModified(String name,
ClassLoader classLoader)
throws IOException
IOException
public boolean exists(String name,
ClassLoader classLoader)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||