public byte [ ] dumps ( Object o ) throws PickleException , IOException { ByteArrayOutputStream bo = new ByteArrayOutputStream ( ) ; dump ( o , bo ) ; bo . flush ( ) ; return bo . toByteArray ( ) ; }
Pickle a given object graph returning the result as a byte array .