public class Pickler extends 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(Object o,
OutputStream stream)
Pickle a given object graph, writing the result to the output stream.
|
byte[] |
dumps(Object o)
Pickle a given object graph, returning the result as a byte array.
|
static void |
registerCustomPickler(Class<?> clazz,
IObjectPickler pickler)
Register additional object picklers for custom classes.
|
void |
save(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 IOException
IOExceptionpublic static void registerCustomPickler(Class<?> clazz, IObjectPickler pickler)
public byte[] dumps(Object o) throws PickleException, IOException
PickleExceptionIOExceptionpublic void dump(Object o, OutputStream stream) throws IOException, PickleException
IOExceptionPickleExceptionpublic void save(Object o) throws PickleException, IOException
PickleExceptionIOExceptionCopyright © 2015. All rights reserved.