This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Q: Serialization?
Per,
Using kawa 1.6.70 I got mixed results re. serialization. Has something
changed recently? I could serialize 1, 1.0, #(1 2 3) just fine.
Serializing (list 1 2 3) deserialized to (). De/serializing '(1 2 3) and
1/3 threw errors.
(define (externalize obj)
(let ((b (make <java.io.ByteArrayOutputStream>)))
(invoke (make <java.io.ObjectOutputStream> b)
'writeObject
obj)
(invoke b 'toByteArray)))
(define (internalize bytearray)
(invoke
(make <java.io.ObjectInputStream>
(make <java.io.ByteArrayInputStream> bytearray))
'readObject))
--
Bruce R. Lewis http://brl.sourceforge.net/