|
|||||||||
| 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(Writer writer)
Constructs a Serializer that writes its output to writer. |
|
| Method Summary | |
|---|---|
void |
flush()
Flushes the Serializer's output to its writer. |
static String |
serializeObject(Object anObject)
Convenience method for generating anObject's ASCII serialization. |
void |
writeObject(Object anObject)
Serializes anObject to its writer |
static boolean |
writeObject(Writer writer,
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(Writer writer)
| Method Detail |
|---|
public void flush()
throws IOException
flush in interface Flushableflush in class FilterWriterIOException
public void writeObject(Object anObject)
throws IOException
IOExceptionpublic static String serializeObject(Object anObject)
public static boolean writeObject(Writer writer,
Object anObject)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||