Skip to content

SerializationStream

SerializationStream is an abstraction of serialized streams for writing out serialized key-value records.

Contract

Closing Stream

close(): Unit

Flushing Stream

flush(): Unit

Used when:

Writing Out Object

writeObject[T: ClassTag](
  t: T): SerializationStream

Used when:

Implementations

  • JavaSerializationStream
  • KryoSerializationStream

Writing Out All Records

writeAll[T: ClassTag](
  iter: Iterator[T]): SerializationStream

writeAll writes out records of the given iterator (one by one as objects).

writeAll is used when:

Writing Out Key

writeKey[T: ClassTag](
  key: T): SerializationStream

Writes out the key

writeKey is used when:

Writing Out Value

writeValue[T: ClassTag](
  value: T): SerializationStream

Writes out the value

writeValue is used when:

Back to top