Sparse File Allocation Query

How does one query a sparse file in the kernel to determine which areas are
allocated and which areas are not?

Thanks,

Ken