Added method to get the filesize of a stream