Binary Search - Java

Can Arrays.binarySearch() in java always be used to find the index of floor or ceil element appropriately because it uses the insertion point idea in it ?

Because in The Wave we were able to directly use it.

I used it. See my Code Solution: 4798924 | CodeChef. works same as c++ lower_bound. For floor and ceiling. I think needs to use treeset