|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scrashmeow.ojb.console.CastorUtils
Defines utility methods for marshalling code generated objects
Constructor Summary | |
CastorUtils()
|
Method Summary | |
static java.lang.String |
marshalToString(java.lang.Object obj)
Marshal an object to a string |
static java.lang.Object |
unmarshalFromFile(java.lang.Class classToLoad,
java.io.File fh)
Unmarshal an an object from a File. |
static java.lang.Object |
unmarshalFromStream(java.lang.Class classToLoad,
java.io.InputStream is)
Unmarshal an an object from a stream. |
static java.lang.Object |
unmarshalFromString(java.lang.Class classToLoad,
java.lang.String str)
Unmarshal an an object from a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CastorUtils()
Method Detail |
public static java.lang.Object unmarshalFromString(java.lang.Class classToLoad, java.lang.String str) throws org.exolab.castor.xml.ValidationException, org.exolab.castor.xml.MarshalException
classToLoad
- the Class of the object to unmarshalstr
- the string containing the serialized object.
org.exolab.castor.xml.MarshalException
- an error occurred unmarshalling
org.exolab.castor.xml.ValidationException
- an error occurred while validating the xmlpublic static java.lang.Object unmarshalFromStream(java.lang.Class classToLoad, java.io.InputStream is) throws org.exolab.castor.xml.ValidationException, org.exolab.castor.xml.MarshalException
classToLoad
- the Class of the object to unmarshalis
- the stream containing the serialized object.
org.exolab.castor.xml.MarshalException
- an error occurred unmarshalling
org.exolab.castor.xml.ValidationException
- an error occurred while validating the xmlpublic static java.lang.Object unmarshalFromFile(java.lang.Class classToLoad, java.io.File fh) throws org.exolab.castor.xml.ValidationException, org.exolab.castor.xml.MarshalException, java.io.FileNotFoundException
classToLoad
- the Class of the object to unmarshalfh
- the file containing the serialized object.
java.io.FileNotFoundException
- an error occurred while reading the file
org.exolab.castor.xml.MarshalException
- an error occurred unmarshalling
org.exolab.castor.xml.ValidationException
- an error occurred while validating the xmlpublic static java.lang.String marshalToString(java.lang.Object obj) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
obj
- the object
org.exolab.castor.xml.MarshalException
- an error occurred marshalling
org.exolab.castor.xml.ValidationException
- an error occurred while validating the xml
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |