Load file content from smack-config.xml file Loads the configuration from the smack-config.xml file, smack
/**
* Loads the configuration from the smack-config.xml file. <p>
*
* So far this means that:
* 1) a set of classes will be loaded in order to execute their static init block
* 2) retrieve and set the current Smack release
*/
Static {
Try {
// Get an array of class loaders to try loading the providers files from.
ClassLoader [] classLoaders = getClassLoaders ();
For (ClassLoader classLoader: classLoaders ){
Enumeration configEnum = classLoader. getResources ("META-INF/smack-config.xml ");
While (configEnum. hasMoreElements ()){
URL url = (URL) configEnum. nextElement ();
InputStream systemStream = null;
Try {
SystemStream = url. openStream ();
XmlPullParser parser = XmlPullParserFactory. newInstance (). newPullParser ();
Parser. setFeature (XmlPullParser. FEATURE_PROCESS_NAMESPACES, true );
Parser. setInput (systemStream, "UTF-8 ");
Int eventType = parser. getEventType ();
Do {
If (eventType = XmlPullParser. START_TAG ){
If (parser. getName (). equals ("className ")){
// Attempt to load the class so that the class can get initialized
ParseClassToLoad (parser );
}
Else if (parser. getName (). equals ("packetReplyTimeout ")){
PacketReplyTimeout = parseIntProperty (parser, packetReplyTimeout );
}
Else if (parser. getName (). equals ("keepAliveInterval ")){
KeepAliveInterval = parseIntProperty (parser, keepAliveInterval );
}
Else if (parser. getName (). equals ("mechName ")){
DefaultMechs. add (parser. nextText ());
}
Else if (parser. getName (). equals ("localSocks5ProxyEnabled ")){
LocalSocks5ProxyEnabled = Boolean. parseBoolean (parser. nextText ());
}
Else if (parser. getName (). equals ("localSocks5ProxyPort ")){
LocalSocks5ProxyPort = parseIntProperty (parser, localSocks5ProxyPort );
}
Else if (parser. getName (). equals ("packetCollectorSize ")){
PacketCollectorSize = parseIntProperty (parser, packetCollectorSize );
}
}
EventType = parser. next ();
}
While (eventType! = XmlPullParser. END_DOCUMENT );
}
Catch (Exception e ){
E. printStackTrace ();
}
Finally {
Try {
SystemStream. close ();
}
Catch (Exception e ){
// Ignore.
}
}
}
}
}
Catch (Exception e ){
E. printStackTrace ();
}
}
WWE SmackDown The latest theme song Divide The Day-Let it, in MP3 format,
Www.dbank.com/..c0dd04