I’ll also offer a few observations at the end of the post. The example on the left in the image above uses the css below. Also, you should not be sending such information to your log file for status or exception reporting. It just needed a link to the image mask I wanted to use. your programmers should not have access to the actual data for development work. Here's my code: import java.io. Your web site (https) should also be hardened from SQL injection attacks, etc. The setup for these examples is actually quite simple. How to mask part of string in Java? For example, if the mask is '(###) ###-####', the current value is '(415) 555-1212', and valueContainsLiteralCharacters is true stringToValue will return '(415) 555-1212'. to handle as much of that sensitive data as possible. You can see the results below. I’m not sure why, since Safari is supposed to have support. In practice I couldn’t get these examples to work in Safari, though they did work in Webkit Nightly. First I tried to mask the image with simple linear and radial gradients, After that I decided to have a little more fun and play around with some of the other masking properties. By varying the x and y offsets and the size of the radius you can create more interesting shapes. The screenshots below are all from Chrome Canary. Archived in CSS and tagged clipping, demo, masking, You are here: Java Examples: Reading Input - Password Masking. The difference you see in the screenshots below is mainly the difference in how the div or image was clipped or what I used to mask it. Perhaps you should look into a trusted third party (paypal?) There’s one last topic I want to cover in regards to future css and that’s filtering. Each of the paragraphs was filled with some lorem ipsum text and I added some general and arbitrary default styling. For example, displaying a credit card number (where … To ensure that masking can occur when the system is under heavy use, the calling thread priority is set to the max for the duration of the call. If all the characters are matched, it returns true else it will return false. Here’s how it looks without any styling applied. The clipping examples below use basic shapes to clip an element or image so as a quick reminder here’s how those shapes work. More browsers support both clipping and masking than don’t support them. Again while css clipping and masking isn’t going to work in every browser, there isn’t much harm in using either as far as I can tell. Still you can likely see how a little bit of experimentation and creativity can lead to some interesting results. To implement Data masking in java, let´s focus on following example in which we mask some ATM card numbers: ***** Data Masking Example in java ***** /** * …