|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.FilterWriter
ariba.util.io.Serializer
public class Serializer
Object subclass that can serialize a fixed set of data types (Dictionaries, arrays, Lists, and Strings) to an ASCII writer. If the object passed in is not one of these types, or contains an object that is not one of these types, the Serializer converts the object to a string via the object's toString() method. The serialization format is very similar to the output of Map's and List's toString() methods, except that strings with non-alphanumeric characters are quoted and special characters are escaped, so that the output can be unambiguously deserialized. Serializer produces an ASCII representation with few, if any, spaces separating components. To get a more readable representation, use the OutputSerializer class.
Deserializer
Constructor Summary | |
---|---|
Serializer(java.io.Writer writer)
Constructs a Serializer that writes its output to writer. |
Method Summary | |
---|---|
void |
flush()
Flushes the Serializer's output to its writer. |
static java.lang.String |
serializeObject(java.lang.Object anObject)
Convenience method for generating anObject's ASCII serialization. |
void |
writeObject(java.lang.Object anObject)
Serializes anObject to its writer |
static boolean |
writeObject(java.io.Writer writer,
java.lang.Object anObject)
Convenience method for writing anObjectwriter. |
Methods inherited from class java.io.FilterWriter |
---|
close, write, write, write |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Serializer(java.io.Writer writer)
Method Detail |
---|
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterWriter
java.io.IOException
public void writeObject(java.lang.Object anObject) throws java.io.IOException
java.io.IOException
public static java.lang.String serializeObject(java.lang.Object anObject)
public static boolean writeObject(java.io.Writer writer, java.lang.Object anObject)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |