Beware of writing code for which there already is a library; you may be able to practise better on different code, for one thing, and the library will probably have been extensively verified and tested. Reinventing the wheel is often not a good idea.
Start by explaining what you mean by “stripping NON ASCII data from an input string”. You need a definite specification of
what you are going to do before you try to do it.
Once you have decided that, you will probably find it easy to create code. Then you will have to decide on a name for the method and for the class it is in. I don't think the name of your method accurately describes what you are doing, because it doesn't mention replacement by spaces. Also decide what sort of class you are going to use: is it going to be a utility class (which I think is implied by your use of
static) or an object?
I think your code will correctly replace all
chars valued > 0x007f with 0x0020 (=single space). But I have all sorts of questions:-
1: Why are you using ints rather than chars? Even when line 16 uses a char?2: Do you want code points or chars?3: Why are you calling the variable WHITE_SPACE when it is actually a single space?4: Why did you start with 0, which is the null character? Do you want to retain control characters in your text?5: Is it possible to get a code point < 0? Is one of your tests for the range of the character in line 15 redundant?6: Can you replace the if‑else starting line 15 with the ?: operator?I think answering those questions will make you understand your code better and enable you to work out improvements. I would suggest you
test that method with lots of Strings with or without characters > 0x007f. Pass an expected input and output and see whether you achieve the expected output.
Once you have done that, there is one essential part of the method you have omitted. The biggest part of what you write should be documentation comments explaining what the method does. Beware: once you have written a documentation comment for a public method and released it, you ought to maintain the contract implied by that documentation for ever.