All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.chill.StreamSerializer.scala Maven / Gradle / Ivy

The newest version!
package com.twitter.chill

class StreamSerializer[T]() extends KSerializer[Stream[T]] {
  def write(kser: Kryo, out: Output, stream: Stream[T]) {
    kser.writeClassAndObject(out, stream.toList)
  }

  def read(kser: Kryo, in: Input, cls: Class[Stream[T]]): Stream[T] = {
    kser.readClassAndObject(in).asInstanceOf[List[T]].toStream
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy