public class JDOMUtils
extends java.lang.Object
Constructor and Description |
---|
JDOMUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getResourcePath(java.lang.Object object,
java.lang.String resource)
Finds objects in the classpath.
|
static java.lang.String |
MD5Encode(java.lang.String str)
Make an MD5 Hash from a particular string.
|
static void |
XML2JDOM(java.io.File file,
org.jdom.Document doc)
Generates a Document from a XML file
|
static void |
XML2JDOM(java.io.Reader is,
org.jdom.Document doc)
Generates a Document from a XML input stream
|
static void |
XML2JDOM(java.lang.String xml,
org.jdom.Document doc)
Generates a Document from a XML string.
|
public static void XML2JDOM(java.io.Reader is, org.jdom.Document doc) throws java.lang.Exception
is
- the input xml streamjava.lang.Exception
- if something goes wrong during the parsing processpublic static void XML2JDOM(java.lang.String xml, org.jdom.Document doc) throws java.lang.Exception
xml
- the input xml stringjava.lang.Exception
- if something goes wrong during the parsing processpublic static void XML2JDOM(java.io.File file, org.jdom.Document doc) throws java.lang.Exception
file
- the input xml file handlejava.lang.Exception
- if something goes wrong during the parsing processpublic static java.lang.String MD5Encode(java.lang.String str) throws java.io.UnsupportedEncodingException
str
- - the string to be hashed.java.io.UnsupportedEncodingException
public static java.lang.String getResourcePath(java.lang.Object object, java.lang.String resource)
object
- resource
-