public class Pickler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HIGHEST_PROTOCOL |
| Constructor and Description |
|---|
Pickler()
Create a Pickler.
|
Pickler(boolean useMemo)
Create a Pickler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the pickler stream, discard any internal buffers.
|
void |
dump(java.lang.Object o,
java.io.OutputStream stream)
Pickle a given object graph, writing the result to the output stream.
|
byte[] |
dumps(java.lang.Object o)
Pickle a given object graph, returning the result as a byte array.
|
static void |
registerCustomPickler(java.lang.Class<?> clazz,
IObjectPickler pickler)
Register additional object picklers for custom classes.
|
void |
save(java.lang.Object o)
Pickle a single object and write its pickle representation to the output stream.
|
public Pickler()
public Pickler(boolean useMemo)
public void close()
throws java.io.IOException
java.io.IOExceptionpublic static void registerCustomPickler(java.lang.Class<?> clazz,
IObjectPickler pickler)
public byte[] dumps(java.lang.Object o)
throws PickleException,
java.io.IOException
PickleExceptionjava.io.IOExceptionpublic void dump(java.lang.Object o,
java.io.OutputStream stream)
throws java.io.IOException,
PickleException
java.io.IOExceptionPickleExceptionpublic void save(java.lang.Object o)
throws PickleException,
java.io.IOException
PickleExceptionjava.io.IOException