|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xerox.amazonws.common.JAXBuddy
public class JAXBuddy
This class implements some helpful methods to marshal and unmarshal xml.
Field Summary | |
---|---|
static Hashtable<String,javax.xml.bind.JAXBContext> |
contextCache
|
Constructor Summary | |
---|---|
JAXBuddy()
|
Method Summary | ||
---|---|---|
static void |
clearCache()
This method will clear the internal cache we use to speed up these util functions. |
|
static DocumentBuilder |
createDocumentBuilder()
|
|
static
|
deserializeXMLStream(Class<T> c,
InputStream is)
A convenience method to turn XML in a stream into an object. |
|
static
|
serializeXMLFile(Class<T> c,
Object object)
A convenience method to turn an object into a stream of XML. |
|
static
|
serializeXMLString(Class<T> c,
Object object)
A convenience method to turn an object into a string of XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Hashtable<String,javax.xml.bind.JAXBContext> contextCache
Constructor Detail |
---|
public JAXBuddy()
Method Detail |
---|
public static DocumentBuilder createDocumentBuilder() throws Exception
Exception
public static <T> InputStream serializeXMLFile(Class<T> c, Object object) throws javax.xml.bind.JAXBException, IOException
c
- the class you're serializingobject
- the object you're serializing
javax.xml.bind.JAXBException
IOException
public static <T> String serializeXMLString(Class<T> c, Object object) throws javax.xml.bind.JAXBException, IOException
c
- the class you're serializingobject
- the object you're serializing
javax.xml.bind.JAXBException
IOException
public static <T> T deserializeXMLStream(Class<T> c, InputStream is) throws javax.xml.bind.JAXBException, IOException, SAXException
c
- the class you're deserializingis
- the stream to read the XMl from
javax.xml.bind.JAXBException
IOException
SAXException
public static void clearCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |