/** * Set the resource we are requesting from the server. * * @param resource the non-null CharSequence to use a resource. * @return a reference ot this builder. * @throws XmppStringprepException if the CharSequence is not a valid resourcepart. * @see #setResource(Resourcepart) */ public B setResource(CharSequence resource) throws XmppStringprepException { Objects.requireNonNull(resource, "resource must not be null"); return setResource(Resourcepart.from(resource.toString())); }
/** * Set the resource we are requesting from the server. * * @param resource the non-null CharSequence to use a resource. * @return a reference ot this builder. * @throws XmppStringprepException if the CharSequence is not a valid resourcepart. * @see #setResource(Resourcepart) */ public B setResource(CharSequence resource) throws XmppStringprepException { Objects.requireNonNull(resource, "resource must not be null"); return setResource(Resourcepart.from(resource.toString())); }