Commit b4f65ff8 authored by Noric Couderc's avatar Noric Couderc

Changed FileInputStream to InputStream

Means that deserializing from memory is also possible
parent fd330da9
......@@ -7,6 +7,7 @@ import org.apache.commons.lang3.tuple.ImmutablePair
import java.io.Reader
import se.lth.cs.bcgen.*
import java.io.FileInputStream
import java.io.InputStream
import java.io.ObjectInputStream
import java.util.*
import java.util.stream.Collector
......@@ -69,7 +70,7 @@ class TraceLoader {
return m.mapValues { it.value.map { benchmarkIndex++ }.stream() }
}
fun deserialize(r : FileInputStream): List<BCBenchmarkPackage<*>> {
fun deserialize(r : InputStream): List<BCBenchmarkPackage<*>> {
// TODO: Test this
return ObjectInputStream(r).readObject() as List<BCBenchmarkPackage<*>>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment