public class Serializer extends Object
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
classLoader |
protected boolean |
usePluginUrls |
Constructor and Description |
---|
Serializer() |
Serializer(boolean usePluginUrls) |
Modifier and Type | Method and Description |
---|---|
<T> T |
deserializeObject(Class<T> clazz,
InputStream inStream) |
<T> T |
deserializeObject(Class<T> clazz,
String xmlObject)
Deserializes any object that has been serialized by the serializedObject(T) method
|
ClassLoader |
getClassLoader() |
void |
refreshClassLoader() |
<T> String |
serializeObject(T object)
Serializes any java object into a java Serializable String
|
<T> void |
serializeObject(T object,
OutputStream outStream) |
void |
setUsePluginUrls(boolean usePluginUrls) |
protected ClassLoader classLoader
protected boolean usePluginUrls
public Serializer()
public Serializer(boolean usePluginUrls)
public void refreshClassLoader()
public void setUsePluginUrls(boolean usePluginUrls)
public ClassLoader getClassLoader()
public <T> String serializeObject(T object)
T
- Object type to be serializedobject
- The Object of type public <T> void serializeObject(T object, OutputStream outStream)
public <T> T deserializeObject(Class<T> clazz, String xmlObject)
T
- Type of Object that was originally serializedclazz
- The class object representation of the object typexmlObject
- The String for of the object to be deserializedClassNotFoundException
InstantiationException
IllegalAccessException
public <T> T deserializeObject(Class<T> clazz, InputStream inStream)
Copyright © 1999-2015 Apache OODT. All Rights Reserved.