|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.netseeker.ejoe.adapter.BaseAdapter de.netseeker.ejoe.adapter.CastorAdapter
public class CastorAdapter
An adapter for (de)serializing objects via the Castor XML library. This adapter implementation uses the performance hints described in the Castor Marshalling FAQ, that means it does:
Constructor Summary | |
---|---|
CastorAdapter()
Creates a new instance of this adapter. |
|
CastorAdapter(boolean validate)
Creates a new instance of this adapter. |
|
CastorAdapter(org.exolab.castor.mapping.Mapping mapping)
Creates a new instance of this adapter using the given Castor mapping. |
|
CastorAdapter(java.lang.String pathToMappingFile)
Creates a new instance of this adapter using the Castor mapping loaded from the given mapping file. |
|
CastorAdapter(java.net.URL pathToMappingFile)
Creates a new instance of this adapter using the Castor mapping loaded from the given mapping file. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
|
void |
handleClassLoaderChange(java.lang.ClassLoader classLoader)
Signals a change of the ContextClassLoader of the current thread to the adapter. |
java.lang.Object |
read(java.io.InputStream in)
Deserializes an object out of an given InputStream |
boolean |
requiresCustomEOFHandling()
Signals if this adapter has problems with EJOE's UncloseableInputStreams and requires a really closed Stream (which EJOE prevents to ensure that an adapter can not close the underlying socket unintentionally). |
void |
setValidation(boolean enable)
Either enables or disables Castors validation feature. |
void |
write(java.lang.Object obj,
java.io.OutputStream out)
Serializes an object into an output stream |
Methods inherited from class de.netseeker.ejoe.adapter.BaseAdapter |
---|
isSelfBuffered |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CastorAdapter()
public CastorAdapter(boolean validate)
validate
- either Castor validation should be enabled or not.public CastorAdapter(org.exolab.castor.mapping.Mapping mapping) throws org.exolab.castor.mapping.MappingException
mapping
- existing Castor mapping to use
org.exolab.castor.mapping.MappingException
public CastorAdapter(java.lang.String pathToMappingFile) throws java.io.IOException, org.exolab.castor.mapping.MappingException
pathToMappingFile
- path of the Castor mapping file to use
java.io.IOException
org.exolab.castor.mapping.MappingException
public CastorAdapter(java.net.URL pathToMappingFile) throws java.io.IOException, org.exolab.castor.mapping.MappingException
pathToMappingFile
- path of the Castor mapping file to use
java.io.IOException
org.exolab.castor.mapping.MappingException
Method Detail |
---|
public void setValidation(boolean enable)
enable
- public java.lang.Object read(java.io.InputStream in) throws java.lang.Exception
SerializeAdapter
in
- the input stream to use for deserialization
java.lang.Exception
public void write(java.lang.Object obj, java.io.OutputStream out) throws java.lang.Exception
SerializeAdapter
obj
- object that should get serializedout
- the outputstream into which the object should serialized
java.lang.Exception
public void handleClassLoaderChange(java.lang.ClassLoader classLoader)
SerializeAdapter
handleClassLoaderChange
in interface SerializeAdapter
handleClassLoaderChange
in class BaseAdapter
public boolean requiresCustomEOFHandling()
SerializeAdapter
requiresCustomEOFHandling
in interface SerializeAdapter
requiresCustomEOFHandling
in class BaseAdapter
public java.lang.String getContentType()
getContentType
in interface SerializeAdapter
getContentType
in class BaseAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |