|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CharSerializer
Character-based Serializer. Used for non-binary serialization. See the superinterface for details.
To use a Serializer to write to a String, consider using a
ByteArrayOutputStream and then calling its toString() method to
retrieve the result String. To read, use the getBytes method of
the String as input to the ByteArrayInputStream ctor.
Most other formats have associated input/output streams that are
fairly straightforward (e.g. FileInputStream/FileOutputStream).
| Method Summary | |
|---|---|
boolean |
isArray(java.io.Reader in)
Destructively tests the stream to see if it contains an array or a single SandMessage. |
SandMessage |
read(java.io.Reader in)
Read the specified stream for a SandMessage. |
SandMessage[] |
readArray(java.io.Reader in)
Reads the specified stream for a SandMessage[]. |
void |
write(SandMessage msg,
java.io.PrintWriter out)
Write the specified SandMessage to the output stream. |
void |
writeArray(SandMessage[] msgArray,
java.io.PrintWriter out)
Write the specified SandMessage[] to the output stream. |
| Method Detail |
|---|
void write(SandMessage msg,
java.io.PrintWriter out)
throws java.io.IOException
java.io.IOException
SandMessage read(java.io.Reader in)
throws java.io.IOException
java.io.IOException
void writeArray(SandMessage[] msgArray,
java.io.PrintWriter out)
throws java.io.IOException
java.io.IOException
SandMessage[] readArray(java.io.Reader in)
throws java.io.IOException
java.io.IOException
boolean isArray(java.io.Reader in)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||