@@ -0,0 +1,1712 @@
+/**%0A *%0A * Copyright %C2%A9 2014 Florian Schmaus%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.jxmpp.stringprep.simple;%0A%0Aimport java.util.Locale;%0A%0Aimport org.jxmpp.stringprep.XmppStringPrepUtil;%0Aimport org.jxmpp.stringprep.XmppStringprep;%0Aimport org.jxmpp.stringprep.XmppStringprepException;%0A%0Apublic class SimpleXmppStringprep implements XmppStringprep %7B%0A%0A%09private static SimpleXmppStringprep instance;%0A%0A%09public static void setup() %7B%0A%09%09XmppStringPrepUtil.setXmppStringprep(getInstance());%0A%09%7D%0A%0A%09public static SimpleXmppStringprep getInstance() %7B%0A%09%09if (instance == null) %7B%0A%09%09%09instance = new SimpleXmppStringprep();%0A%09%09%7D%0A%09%09return instance;%0A%09%7D%0A%0A%09private SimpleXmppStringprep() %7B%0A%09%7D%0A%0A%09@Override%0A%09public String nodeprep(String string) throws XmppStringprepException %7B%0A%09%09return simpleStringprep(string);%0A%09%7D%0A%0A%09@Override%0A%09public String nameprep(String string) throws XmppStringprepException %7B%0A%09%09return simpleStringprep(string);%0A%09%7D%0A%0A%09@Override%0A%09public String resourceprep(String string) throws XmppStringprepException %7B%0A%09%09return simpleStringprep(string);%0A%09%7D%0A%0A%09private static String simpleStringprep(String string) %7B%0A%09%09String res = string.toLowerCase(Locale.US);%0A%09%09res = res.trim();%0A%09%09return res;%0A%09%7D%0A%7D%0A

Add SimpleXmppStringprep