public final class StringPrep extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOW_UNASSIGNED
Option to allow processing of unassigned code points in the input
|
static int |
DEFAULT
Option to prohibit processing of unassigned code points in the input
|
static int |
RFC3491_NAMEPREP
Profile type: RFC3491 Nameprep
|
static int |
RFC3530_NFS4_CIS_PREP
Profile type: RFC3530 nfs4_cis_prep
|
static int |
RFC3530_NFS4_CS_PREP
Profile type: RFC3530 nfs4_cs_prep
|
static int |
RFC3530_NFS4_CS_PREP_CI
Profile type: RFC3530 nfs4_cs_prep with case insensitive option
|
static int |
RFC3530_NFS4_MIXED_PREP_PREFIX
Profile type: RFC3530 nfs4_mixed_prep for prefix
|
static int |
RFC3530_NFS4_MIXED_PREP_SUFFIX
Profile type: RFC3530 nfs4_mixed_prep for suffix
|
static int |
RFC3722_ISCSI
Profile type: RFC3722 iSCSI
|
static int |
RFC3920_NODEPREP
Profile type: RFC3920 XMPP Nodeprep
|
static int |
RFC3920_RESOURCEPREP
Profile type: RFC3920 XMPP Resourceprep
|
static int |
RFC4011_MIB
Profile type: RFC4011 Policy MIB Stringprep
|
static int |
RFC4013_SASLPREP
Profile type: RFC4013 SASLprep
|
static int |
RFC4505_TRACE
Profile type: RFC4505 trace
|
static int |
RFC4518_LDAP
Profile type: RFC4518 LDAP
|
static int |
RFC4518_LDAP_CI
Profile type: RFC4518 LDAP for case ignore, numeric and stored prefix
matching rules
|
| Constructor and Description |
|---|
StringPrep(InputStream inputStream)
Creates an StringPrep object after reading the input stream.
|
| Modifier and Type | Method and Description |
|---|---|
static StringPrep |
getInstance(int profile)
Gets a StringPrep instance for the specified profile
|
String |
prepare(String src,
int options)
Prepare the input String for use in applications with the given profile.
|
StringBuffer |
prepare(UCharacterIterator src,
int options)
Prepare the input buffer for use in applications with the given profile.
|
public static final int DEFAULT
public static final int ALLOW_UNASSIGNED
public static final int RFC3491_NAMEPREP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3530_NFS4_CS_PREP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3530_NFS4_CS_PREP_CI
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3530_NFS4_CIS_PREP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3530_NFS4_MIXED_PREP_PREFIX
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3530_NFS4_MIXED_PREP_SUFFIX
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3722_ISCSI
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3920_NODEPREP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC3920_RESOURCEPREP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC4011_MIB
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC4013_SASLPREP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC4505_TRACE
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC4518_LDAP
StringPrep.getInstance(int),
Constant Field Valuespublic static final int RFC4518_LDAP_CI
StringPrep.getInstance(int),
Constant Field Valuespublic StringPrep(InputStream inputStream) throws IOException
inputStream - The stream for reading the StringPrep profile binarySunIOException - An exception occurs when I/O of the inputstream is invalidpublic static StringPrep getInstance(int profile)
profile - The profile passed to find the StringPrep instance.public StringBuffer prepare(UCharacterIterator src, int options) throws StringPrepParseException
src - A UCharacterIterator object containing the source stringoptions - A bit set of options:
StringPrep.DEFAULT Prohibit processing of unassigned code points in the inputStringPrep.ALLOW_UNASSIGNED Treat the unassigned code points are in the input
as normal Unicode code points.StringPrepParseException - An exception occurs when parsing a string is invalid.public String prepare(String src, int options) throws StringPrepParseException
src - A stringoptions - A bit set of options:
StringPrep.DEFAULT Prohibit processing of unassigned code points in the inputStringPrep.ALLOW_UNASSIGNED Treat the unassigned code points are in the input
as normal Unicode code points.StringPrepParseException - An exception when parsing or preparing a string is invalid.