dataAvailable method backported to 2.4