com.twistedmatrix.spread
Class Jelly.JellyEncoder
java.lang.Object
|
+--com.twistedmatrix.spread.Jelly.JellyEncoder
- Direct Known Subclasses:
- PBJellyEncoder
- Enclosing class:
- Jelly
- public static class Jelly.JellyEncoder
- extends java.lang.Object
Encodes an object using Jelly s-expression format.
Supports null, Integer, ByteString, Byte, Short, Float, Double, byte[]
and List, PrimitiveMap and Object[] of supported types.
The actual result is either a List, Double, Integer, or ByteString.
Method Summary |
protected java.lang.Object |
_jelly(PrimitiveMap dict)
|
java.lang.Object |
jelly(java.lang.Object o)
Make a Jelly S-Expression from an object. |
java.util.ArrayList |
prepare(java.lang.Object o)
|
java.util.ArrayList |
preserve(java.lang.Object o,
java.util.ArrayList sexp)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Jelly.JellyEncoder
public Jelly.JellyEncoder(JellyPolicy policy)
- Create a new JellyEncoder.
- Parameters:
policy
- used when jellying unknown objects and the like.
prepare
public java.util.ArrayList prepare(java.lang.Object o)
preserve
public java.util.ArrayList preserve(java.lang.Object o,
java.util.ArrayList sexp)
jelly
public java.lang.Object jelly(java.lang.Object o)
- Make a Jelly S-Expression from an object.
_jelly
protected java.lang.Object _jelly(PrimitiveMap dict)