Thanks for your solution. However, I noticed that there is a typo in it: (a,b) -> ((a,b) -> (b.compareTo(a)).
Moreover, I found that in your implementation, the small is a min heap, and the large is a max heap.Thus, the small stores the larger half of the numbers, and the large stores the smaller half of the numbers. Although it works, it is a little confusing here, since it is different from the explanation given by Stefan at the very beginning.
Find Median from Data Stream