public final class MaskedString
extends Object
Represents a confidential string (like a password or a secret token) whose content is masked in
toString(). Do not use this class if the length of the string must not be revealed.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
boolean
int
Returns a masked representation of this
String.
Returns the unmasked representation of this
String.
Method Details
toString
Returns a masked representation of this
String. Each character is replaced with
*.
Overrides:
toString in class Object
Returns:
masked representation of this String . Each character is replaced with
*.
toUnmaskedString
public String toUnmaskedString ()
Returns the unmasked representation of this
String.
Returns:
unmasked representation of this String