|
|||||||||
| 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
ariba.util.io.FormattingSerializer
public class FormattingSerializer
Serializer subclass that formats and indents the ASCII generated by the Serializer. This class makes it possible to insert comments into a serialization.
| Constructor Summary | |
|---|---|
FormattingSerializer(Writer writer)
Constructs a FormattingSerializer that writes to writer. |
|
| Method Summary | |
|---|---|
static String |
formatString(String input)
Convenience method to format any ASCII serialization produced by a Serializer. |
int |
indentationLength()
Returns the number of spaces currently used to indent an expression. |
static String |
serializeObject(Object anObject)
Convenience method for generating anObject's ASCII serialization. |
static String |
serializeObject(Object anObject,
int length)
Convenience method for generating anObject's ASCII serialization. |
void |
setIndentationLength(int numberOfSpaces)
Sets the number of spaces to indent an expression. |
void |
writeComment(String aComment,
boolean cStyle)
Writes aComment to the FormattingSerializer's writer. |
void |
writeObject(Object anObject)
Overridden to produce a formatted serialization of anObject. |
static boolean |
writeObject(Writer writer,
Object anObject)
Convenience method for writing anObjectwriter. |
| Methods inherited from class ariba.util.io.Serializer |
|---|
flush |
| 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 FormattingSerializer(Writer writer)
| Method Detail |
|---|
public void setIndentationLength(int numberOfSpaces)
public int indentationLength()
public void writeComment(String aComment,
boolean cStyle)
throws IOException
IOException
public void writeObject(Object anObject)
throws IOException
writeObject in class SerializerIOExceptionpublic static String serializeObject(Object anObject)
public static String serializeObject(Object anObject,
int length)
public static String formatString(String input)
public static boolean writeObject(Writer writer,
Object anObject)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||