Package org.jxmpp.jid.parts
Class Domainpart
java.lang.Object
org.jxmpp.jid.parts.Part
org.jxmpp.jid.parts.Domainpart
- All Implemented Interfaces:
Serializable,CharSequence
A domainpart of an XMPP address (JID).
You can create instances of this class from Strings using from(String).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic DomainpartGet theDomainpartrepresenting the input String.static Domainpartfrom(String domain, JxmppContext context) Get theDomainpartrepresenting the input String.static Domainpartstatic DomainpartLikefrom(String)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.Methods inherited from class org.jxmpp.jid.parts.Part
assertNotLongerThan1023BytesOrEmpty, charAt, equals, hashCode, intern, length, subSequence, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints
-
Method Details
-
fromOrNull
- Parameters:
cs- the input CharSequence- Returns:
- a Domainpart or
null
-
fromOrThrowUnchecked
Likefrom(String)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aDomainpart- Returns:
- the
Domainpartif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a validDomainpart- Since:
- 0.6.2
- See Also:
-
from
Get theDomainpartrepresenting the input String.- Parameters:
domain- the input String.- Returns:
- the domainpart.
- Throws:
XmppStringprepException- if an error occurs.
-
from
Get theDomainpartrepresenting the input String.- Parameters:
domain- the input String.context- the JXMPP context.- Returns:
- the domainpart.
- Throws:
XmppStringprepException- if an error occurs.
-