|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.text.StringPrep
public final class StringPrep
StringPrep API implements the StingPrep framework as described by RFC 3454. StringPrep prepares Unicode strings for use in network protocols. Profiles of StingPrep are set of rules and data according to which the Unicode Strings are prepared. Each profiles contains tables which describe how a code point should be treated. The tables are broadly classied into
Field Summary | |
---|---|
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 Summary | |
---|---|
StringPrep(InputStream inputStream)
Creates an StringPrep object after reading the input stream. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT
prepare(com.ibm.icu.text.UCharacterIterator, int)
,
Constant Field Valuespublic static final int ALLOW_UNASSIGNED
prepare(com.ibm.icu.text.UCharacterIterator, int)
,
Constant Field Valuespublic static final int RFC3491_NAMEPREP
getInstance(int)
,
Constant Field Valuespublic static final int RFC3530_NFS4_CS_PREP
getInstance(int)
,
Constant Field Valuespublic static final int RFC3530_NFS4_CS_PREP_CI
getInstance(int)
,
Constant Field Valuespublic static final int RFC3530_NFS4_CIS_PREP
getInstance(int)
,
Constant Field Valuespublic static final int RFC3530_NFS4_MIXED_PREP_PREFIX
getInstance(int)
,
Constant Field Valuespublic static final int RFC3530_NFS4_MIXED_PREP_SUFFIX
getInstance(int)
,
Constant Field Valuespublic static final int RFC3722_ISCSI
getInstance(int)
,
Constant Field Valuespublic static final int RFC3920_NODEPREP
getInstance(int)
,
Constant Field Valuespublic static final int RFC3920_RESOURCEPREP
getInstance(int)
,
Constant Field Valuespublic static final int RFC4011_MIB
getInstance(int)
,
Constant Field Valuespublic static final int RFC4013_SASLPREP
getInstance(int)
,
Constant Field Valuespublic static final int RFC4505_TRACE
getInstance(int)
,
Constant Field Valuespublic static final int RFC4518_LDAP
getInstance(int)
,
Constant Field Valuespublic static final int RFC4518_LDAP_CI
getInstance(int)
,
Constant Field ValuesConstructor Detail |
---|
public StringPrep(InputStream inputStream) throws IOException
inputStream
- The stream for reading the StringPrep profile binarySun
IOException
- An exception occurs when I/O of the inputstream is invalidMethod Detail |
---|
public 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.NONE Prohibit processing of unassigned code points in the input
- StringPrep.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.NONE Prohibit processing of unassigned code points in the input
- StringPrep.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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |