com.ibm.ulc.util
Class AnythingWriter
java.lang.Object
|
+--com.ibm.ulc.util.UlcObject
|
+--com.ibm.ulc.util.AnythingWriter
- public class AnythingWriter
- extends UlcObject
- implements IAnythingWriter
Writes an Anything in a pure ASCII format. Since the format is nicely formatted
and quite readable it can be considered a "Pretty Printing" format.
The (unverified) format is:
anything:= <simple> | <structure>
simple:= <null> | <string> | <bytes> | <long> | <double> | <boolean> | <serializable>
structure:= '{' { <slot> } '}'
slot:= [ <label> ] <anything>
label:= '/' <ident>
ident:= <long> | <string>
string:= <quoted_string> | <unquoted_string>
quoted_string:= '"' { <character> } '"'
unquoted_string:= <character> { <non_blank_character> }
bytes:= '<' { <hexdigit> <hexdigit> } '>'
serializable:= '[' <serializedJavaObject> ']'
long:= [ '+' | '-' ] <digits> { <digit> }
double:= [ '+' | '-' ] { <digit> } '.' { <digit> }
digit:= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
hexdigit:= <digit> | 'a' | 'b' | 'c' | 'd' | 'e' | 'f'
boolean:= 't' | 'f'
null:= '*'
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AnythingWriter
public AnythingWriter()
AnythingWriter
public AnythingWriter(boolean compact,
boolean skipbytes)
createReader
public IAnythingReader createReader()
- Creates the corresponding reader for this format
- Specified by:
- createReader in interface IAnythingWriter
print
public void print(java.io.OutputStream os,
Anything a)
- Specified by:
- print in interface IAnythingWriter
printEx
public void printEx(java.io.OutputStream os,
Anything a)
throws java.io.InterruptedIOException,
java.io.IOException
- Specified by:
- printEx in interface IAnythingWriter