readFrom

public static CuckooFilter<T> readFrom<T>(InputStream in, Funnel<T> funnel)

Reads a byte stream, which was written by writeTo, into a .

The Funnel to be used is not encoded in the stream, so it must be provided here. Warning: the funnel provided must behave identically to the one used to populate the original Cuckoo filter!

Throws

if the InputStream throws an IOException, or if its data does not appear to be a CuckooFilter serialized using the writeTo method.