|
|||||||||
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(java.io.Writer writer)
Constructs a FormattingSerializer that writes to writer. |
Method Summary | |
---|---|
static java.lang.String |
formatString(java.lang.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 java.lang.String |
serializeObject(java.lang.Object anObject)
Convenience method for generating anObject's ASCII serialization. |
static java.lang.String |
serializeObject(java.lang.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(java.lang.String aComment,
boolean cStyle)
Writes aComment to the FormattingSerializer's writer. |
void |
writeObject(java.lang.Object anObject)
Overridden to produce a formatted serialization of anObject. |
static boolean |
writeObject(java.io.Writer writer,
java.lang.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(java.io.Writer writer)
Method Detail |
---|
public void setIndentationLength(int numberOfSpaces)
public int indentationLength()
public void writeComment(java.lang.String aComment, boolean cStyle) throws java.io.IOException
java.io.IOException
public void writeObject(java.lang.Object anObject) throws java.io.IOException
writeObject
in class Serializer
java.io.IOException
public static java.lang.String serializeObject(java.lang.Object anObject)
public static java.lang.String serializeObject(java.lang.Object anObject, int length)
public static java.lang.String formatString(java.lang.String input)
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 |