Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pubnub.api
Class PubnubUtil

    java.lang.Object
      com.pubnub.api.PubnubUtil

    public class PubnubUtil

extends java.lang.Object

PubnubUtil class provides utility methods like urlEncode etc

Author:
  Pubnub

Constructor Summary
`PubnubUtil()`

Method Summary
`static java.lang.String[]` | `hashtableKeysToArray(java.util.Hashtable ht)` Returns string keys in a hashtable as array of string
`static java.lang.String` | `hashTableKeysToDelimitedString(java.util.Hashtable ht, java.lang.String delimiter)` Returns string keys in a hashtable as delimited string
`static java.lang.String` | `joinString(java.lang.String[] sourceArray, java.lang.String delimiter)` Takes String[] of tokens, and String delimiter as input and returns joined String
`static java.lang.String[]` | `splitString(java.lang.String source, java.lang.String delimiter)` Takes source and delimiter string as inputs and returns splitted string in form of tokens in String array
`static java.lang.String` | `urlEncode(java.lang.String sUrl)` Returns encoded String

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PubnubUtil

    public PubnubUtil()

Method Detail

### urlEncode

    public static java.lang.String urlEncode(java.lang.String sUrl)

  Returns encoded String

  Parameters:
    `sUrl` - , input string
  Returns:
    , encoded string

### splitString

    public static java.lang.String[] splitString(java.lang.String source,
                                                 java.lang.String delimiter)

  Takes source and delimiter string as inputs and returns splitted string in form of tokens in String array

  Parameters:
    `source` - , input String
    `delimiter` - , delimiter to split on
  Returns:
    String[] , tokens in and array

### joinString

    public static java.lang.String joinString(java.lang.String[] sourceArray,
                                              java.lang.String delimiter)

  Takes String[] of tokens, and String delimiter as input and returns joined String

  Parameters:
    `sourceArray` - , input tokens in String array
    `delimiter` - , delimiter to join on
  Returns:
    String , string of tokens joined by delimiter

### hashtableKeysToArray

    public static java.lang.String[] hashtableKeysToArray(java.util.Hashtable ht)

  Returns string keys in a hashtable as array of string

  Parameters:
    `ht` - , Hashtable
  Returns:
    , string array with hash keys string

### hashTableKeysToDelimitedString

    public static java.lang.String hashTableKeysToDelimitedString(java.util.Hashtable ht,
                                                                  java.lang.String delimiter)

  Returns string keys in a hashtable as delimited string

  Parameters:
    `ht` - , Hashtable
    `delimiter` - , String
  Returns:
    , string array with hash keys string

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD