Package jadex.commons.beans
Class XMLEncoder
- java.lang.Object
- 
- jadex.commons.beans.Encoder
- 
- jadex.commons.beans.XMLEncoder
 
 
- 
 public class XMLEncoder extends Encoder XMLEncoderextendsEncoderto write out the encoded statements and expressions in xml format. The xml can be read byXMLDecoderlater to restore objects and their states.ObjectOutputStream. - 
- 
Constructor SummaryConstructors Constructor Description XMLEncoder(java.io.OutputStream out)Construct aXMLEncoder.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Callflush()first, then write out xml footer and close the underlying output stream.voidflush()Writes out all objects since last flush to the output stream.java.lang.ObjectgetOwner()Returns the owner of this encoder.voidsetOwner(java.lang.Object owner)Sets the owner of this encoder.voidwriteExpression(Expression oldExp)Records the expression so that it can be written out later, then calls super implementation.voidwriteObject(java.lang.Object o)Records the object so that it can be written out later, then calls super implementation.voidwriteStatement(Statement oldStat)Records the statement so that it can be written out later, then calls super implementation.- 
Methods inherited from class jadex.commons.beans.Encoderget, getExceptionListener, getPersistenceDelegate, remove, setExceptionListener, setPersistenceDelegate
 
- 
 
- 
 - 
- 
Method Detail- 
closepublic void close() Callflush()first, then write out xml footer and close the underlying output stream.
 - 
flushpublic void flush() Writes out all objects since last flush to the output stream.- 
getOwnerpublic java.lang.Object getOwner() Returns the owner of this encoder.- Returns:
- the owner of this encoder
 
 - 
setOwnerpublic void setOwner(java.lang.Object owner) Sets the owner of this encoder.- Parameters:
- owner- the owner to set
 
 - 
writeExpressionpublic void writeExpression(Expression oldExp) Records the expression so that it can be written out later, then calls super implementation.- Overrides:
- writeExpressionin class- Encoder
- Parameters:
- oldExp- the expression to write. The target, arguments, and return value of the expression are all old objects.
 
 - 
writeObjectpublic void writeObject(java.lang.Object o) Records the object so that it can be written out later, then calls super implementation.- Overrides:
- writeObjectin class- Encoder
- Parameters:
- o- the object to encode
 
 - 
writeStatementpublic void writeStatement(Statement oldStat) Records the statement so that it can be written out later, then calls super implementation.- Overrides:
- writeStatementin class- Encoder
- Parameters:
- oldStat- a statement of old objects
 
 
- 
 
- 
 
- 
 
-