|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.Encoder
com.devexperts.evolution.utils.configencoder.ConfigEncoder
public class ConfigEncoder
The ConfigEncoder
class is a complementary alternative to the XMLEncoder
and can be used to
generate a textual representation of a JavaBean in the same way that the XMLEncoder
can be used
to create XML representation of JavaBeans
.
XMLEncoder
,
ConfigDecoder
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_ENCODING
|
Constructor Summary | |
---|---|
ConfigEncoder(java.io.OutputStream out)
Creates a new output stream for sending JavaBeans to the stream out using UTF-8 encoding. |
|
ConfigEncoder(java.io.Writer out)
|
Method Summary | |
---|---|
void |
close()
This method calls flush , writes the closing postamble and then closes the output stream associated
with this stream. |
NameConverter |
getNameConverter()
|
java.lang.Object |
getOwner()
Gets the owner of this encoder. |
java.beans.PersistenceDelegate |
getPersistenceDelegate(java.lang.Class<?> type)
|
void |
setNameConverter(NameConverter nameConverter)
|
void |
setOwner(java.lang.Object owner)
Sets the owner of this encoder to owner . |
void |
writeExpression(java.beans.Expression oldExp)
Records the Expression so that the Encoder will produce the actual output when the stream is flushed. |
void |
writeObject(java.lang.Object o)
Write an representation of the specified object to the output. |
void |
writeStatement(java.beans.Statement oldStm)
Records the Statement so that the Encoder will produce the actual output when the stream is flushed. |
Methods inherited from class java.beans.Encoder |
---|
get, getExceptionListener, remove, setExceptionListener, setPersistenceDelegate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_ENCODING
Constructor Detail |
---|
public ConfigEncoder(java.io.OutputStream out)
out
using UTF-8 encoding.
out
- The stream to which the representation of the objects will be sent.ConfigDecoder.ConfigDecoder(InputStream)
public ConfigEncoder(java.io.Writer out)
Method Detail |
---|
public void setOwner(java.lang.Object owner)
owner
.
owner
- The owner of this encoder.getOwner()
public java.lang.Object getOwner()
setOwner(java.lang.Object)
public NameConverter getNameConverter()
public void setNameConverter(NameConverter nameConverter)
public void writeObject(java.lang.Object o)
writeObject
in class java.beans.Encoder
o
- The object to be written to the stream.ConfigDecoder.readObject()
public java.beans.PersistenceDelegate getPersistenceDelegate(java.lang.Class<?> type)
getPersistenceDelegate
in class java.beans.Encoder
public void writeStatement(java.beans.Statement oldStm)
writeStatement
in class java.beans.Encoder
oldStm
- The statement that will be written to the stream.PersistenceDelegate.initialize(java.lang.Class>, java.lang.Object, java.lang.Object, java.beans.Encoder)
public void writeExpression(java.beans.Expression oldExp)
writeExpression
in class java.beans.Encoder
oldExp
- The expression that will be written to the stream.PersistenceDelegate.initialize(java.lang.Class>, java.lang.Object, java.lang.Object, java.beans.Encoder)
public void close()
flush
, writes the closing postamble and then closes the output stream associated
with this stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |