简体   繁体   中英

Kryo: How to use the CollectionSerializer with Scala?

Using CollectionSerializer to write is straight forward enough, but how do I de-serialize the byte array. CollectionSerial.

I would expect to be able to do something like this (given the interface):

listSerializer.read(kryo, new Input(bytes), classOf[java.util.Collection[AnyRef]]).toList

or

listSerializer.read(kryo, new Input(bytes), classOf[ListBuffer[AnyRef]]).toList

but nothing I tried compiles.

Thanks in advance.

使用从Kryo文档链接的Chill或akka-kryo-serialization。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM