val bf = BloomFilter[Long](size, 0.01)
val file = File.createTempFile("bloomFilterSerialized", ".tmp")
val out = new BufferedOutputStream(new FileOutputStream(file), 10 * 1000 * 1000)
bf.writeTo(out)
out.close()
val in = new BufferedInputStream(new FileInputStream(file), 10 * 1000 * 1000)
val newbf = BloomFilter.readFrom[Long](in)
in.close()
file.delete()
bf.dispose()
newbf.dispose()
How to serialize/deserialize: