diff --git a/source/org/jivesoftware/smack/SSLXMPPConnection.java b/source/org/jivesoftware/smack/SSLXMPPConnection.java index 5f037bb7d..13234ee31 100644 --- a/source/org/jivesoftware/smack/SSLXMPPConnection.java +++ b/source/org/jivesoftware/smack/SSLXMPPConnection.java @@ -68,7 +68,7 @@ import java.security.cert.CertificateNotYetValidException; /** - * Creates an SSL connection to a XMPP (Jabber) server. + * Creates an SSL connection to a XMPP server. * * @author Matt Tucker */ diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 17738c5d1..09c6b488c 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -61,7 +61,7 @@ import java.io.*; import java.awt.*; /** - * Creates a connection to a XMPP (Jabber) server. A simple use of this API might + * Creates a connection to a XMPP server. A simple use of this API might * look like the following: *
  * // Create a connection to the jivesoftware.com XMPP server.
@@ -122,10 +122,10 @@ public class XMPPConnection {
     }
 
     /**
-     * Creates a new connection to the specified Jabber server. The default port of 5222 will
+     * Creates a new connection to the specified XMPP server. The default port of 5222 will
      * be used.
      *
-     * @param host the name of the jabber server to connect to; e.g. jivesoftware.com.
+     * @param host the name of the XMPP server to connect to; e.g. jivesoftware.com.
      * @throws XMPPException if an error occurs while trying to establish a connection.
      */
     public XMPPConnection(String host) throws XMPPException {
@@ -133,9 +133,9 @@ public class XMPPConnection {
     }
 
     /**
-     * Creates a new connection to the  to the specified Jabber server on the given port.
+     * Creates a new connection to the  to the specified XMPP server on the given port.
      *
-     * @param host the name of the jabber server to connect to; e.g. jivesoftware.com.
+     * @param host the name of the XMPP server to connect to; e.g. jivesoftware.com.
      * @param port the port on the server that should be used; e.g. 5222.
      * @throws XMPPException if an error occurs while trying to establish a connection.
      */
@@ -156,19 +156,19 @@ public class XMPPConnection {
 
     /**
      * Returns the connection ID for this connection, which is the value set by the server
-     * when opening a Jabber stream. If the server does not set a connection ID, this value
+     * when opening a XMPP stream. If the server does not set a connection ID, this value
      * will be null.
      *
-     * @return the ID of this connection returned from the Jabber server.
+     * @return the ID of this connection returned from the XMPP server.
      */
     public String getConnectionID() {
         return connectionID;
     }
 
     /**
-     * Returns the host name of the Jabber server for this connection.
+     * Returns the host name of the XMPP server for this connection.
      *
-     * @return the host name of the Jabber server.
+     * @return the host name of the XMPP server.
      */
     public String getHost() {
         return host;
@@ -178,7 +178,7 @@ public class XMPPConnection {
      * Returns the port number of the XMPP server for this connection. The default port
      * for normal connections is 5222. The default port for SSL connections is 5223.
      *
-     * @return the port number of the Jabber server.
+     * @return the port number of the XMPP server.
      */
     public int getPort() {
         return port;
@@ -364,7 +364,7 @@ public class XMPPConnection {
 
     /**
      * Creates a new chat with the specified participant. The participant should
-     * be a valid Jabber user such as jdoe@jivesoftware.com or
+     * be a valid XMPP user such as jdoe@jivesoftware.com or
      * jdoe@jivesoftware.com/work.
      *
      * @param participant the person to start the conversation with.
@@ -479,7 +479,7 @@ public class XMPPConnection {
 
     /**
      * Initializes the connection by creating a packet reader and writer and opening a
-     * Jabber stream to the server.
+     * XMPP stream to the server.
      *
      * @throws XMPPException if establishing a connection to the server fails.
      */
@@ -508,7 +508,7 @@ public class XMPPConnection {
         if (DEBUG_ENABLED) {
             packetReader.addPacketListener(debugListener, null);
         }
-        // Start the packet writer. This will open a Jabber stream to the server
+        // Start the packet writer. This will open a XMPP stream to the server
         packetWriter.startup();
         // Start the packet reader. The startup() method will block until we
         // get an opening stream packet back from server.
diff --git a/source/org/jivesoftware/smack/packet/Presence.java b/source/org/jivesoftware/smack/packet/Presence.java
index 6407f4d8c..595a74f73 100644
--- a/source/org/jivesoftware/smack/packet/Presence.java
+++ b/source/org/jivesoftware/smack/packet/Presence.java
@@ -136,7 +136,7 @@ public class Presence extends Packet {
 
     /**
      * Returns the status message of the presence update, or null if there
-     * is not status. The status is free-form text describing a user's presence
+     * is not a status. The status is free-form text describing a user's presence
      * (i.e., "gone to lunch").
      *
      * @return the status message.
@@ -147,7 +147,7 @@ public class Presence extends Packet {
 
     /**
      * Sets the status message of the presence update. The status is free-form text
-     * describing a user's presence (i.e., gone to lunch).
+     * describing a user's presence (i.e., "gone to lunch").
      *
      * @param status the status message.
      */
@@ -175,6 +175,7 @@ public class Presence extends Packet {
 
     /**
      * Returns the mode of the presence update, or null if no mode has been set.
+     * A null value for mode means the client is in the standard "available" state.
      *
      * @return the mode.
      */
@@ -183,7 +184,8 @@ public class Presence extends Packet {
     }
 
     /**
-     * Sets the mode of the presence update.
+     * Sets the mode of the presence update. For the standard "available" state, set
+     * the mode to null.
      *
      * @param mode the mode.
      */
diff --git a/source/org/jivesoftware/smack/util/StringUtils.java b/source/org/jivesoftware/smack/util/StringUtils.java
index 5e8dd532b..9544ab580 100644
--- a/source/org/jivesoftware/smack/util/StringUtils.java
+++ b/source/org/jivesoftware/smack/util/StringUtils.java
@@ -68,71 +68,71 @@ public class StringUtils {
     private static final char[] GT_ENCODE = ">".toCharArray();
 
     /**
-     * Returns the name portion of a Jabber ID (JID). For example, for the
-     * JID "matt@jivesoftware.com/Smack", "matt" would be returned. If no
-     * username is present in the JID, the empty string will be returned.
+     * Returns the name portion of a XMPP ID. For example, for the
+     * ID "matt@jivesoftware.com/Smack", "matt" would be returned. If no
+     * username is present in the ID, the empty string will be returned.
      *
-     * @param JID the Jabber ID.
-     * @return the name portion of the JID.
+     * @param ID the XMPP ID.
+     * @return the name portion of the XMPP ID.
      */
-    public static String parseName(String JID) {
-        if (JID == null) {
+    public static String parseName(String ID) {
+        if (ID == null) {
             return null;
         }
-        int atIndex = JID.indexOf("@");
+        int atIndex = ID.indexOf("@");
         if (atIndex < 0) {
-            return JID.substring(0);
+            return ID.substring(0);
         }
         else {
-            return JID.substring(0, atIndex);
+            return ID.substring(0, atIndex);
 
         }
     }
 
     /**
-     * Returns the name portion of a Jabber ID (JID). For example, for the
-     * JID "matt@jivesoftware.com/Smack", "jivesoftware.com" would be returned.
-     * If no server is present in the JID, the empty string will be returned.
+     * Returns the name portion of a XMPP ID. For example, for the
+     * ID "matt@jivesoftware.com/Smack", "jivesoftware.com" would be returned.
+     * If no server is present in the ID, the empty string will be returned.
      *
-     * @param JID the Jabber ID.
-     * @return the resource portion of the JID.
+     * @param ID the XMPP ID.
+     * @return the resource portion of the XMPP ID.
      */
-    public static String parseServer(String JID) {
-        if (JID == null) {
+    public static String parseServer(String ID) {
+        if (ID == null) {
             return null;
         }
-        int atIndex = JID.indexOf("@");
+        int atIndex = ID.indexOf("@");
         // If the String ends with '@', return the empty string.
-        if (atIndex + 1 > JID.length() || atIndex < 0) {
+        if (atIndex + 1 > ID.length() || atIndex < 0) {
             return "";
         }
-        int slashIndex = JID.indexOf("/");
+        int slashIndex = ID.indexOf("/");
         if (slashIndex > 0) {
-            return JID.substring(atIndex + 1, slashIndex);
+            return ID.substring(atIndex + 1, slashIndex);
         }
         else {
-            return JID.substring(atIndex + 1);
+            return ID.substring(atIndex + 1);
         }
     }
 
     /**
-     * Returns the name portion of a Jabber ID (JID). For example, for the
-     * JID "matt@jivesoftware.com/Smack", "Smack" would be returned. If no
-     * resource is present in the JID, the empty string will be returned.
+     * Returns the name portion of a XMPP ID. For example, for the
+     * ID "matt@jivesoftware.com/Smack", "Smack" would be returned. If no
+     * resource is present in the ID, the empty string will be returned.
      *
-     * @param JID the Jabber ID.
-     * @return the resource portion of the JID.
+     * @param ID the XMPP ID.
+     * @return the resource portion of the XMPP ID.
      */
-    public static String parseResource(String JID) {
-        if (JID == null) {
+    public static String parseResource(String ID) {
+        if (ID == null) {
             return null;
         }
-        int slashIndex = JID.indexOf("/");
-        if (slashIndex + 1 > JID.length() || slashIndex < 0) {
+        int slashIndex = ID.indexOf("/");
+        if (slashIndex + 1 > ID.length() || slashIndex < 0) {
             return "";
         }
         else {
-            return JID.substring(slashIndex + 1);
+            return ID.substring(slashIndex + 1);
         }
     }
 
@@ -434,4 +434,4 @@ public class StringUtils {
     private StringUtils() {
         // Not instantiable.
     }
-}
+}
\ No newline at end of file