com.ning.http.client.providers.netty
Class WebSocketUtil

java.lang.Object
  extended by com.ning.http.client.providers.netty.WebSocketUtil

public final class WebSocketUtil
extends Object


Field Summary
static String MAGIC_GUID
           
 
Constructor Summary
WebSocketUtil()
           
 
Method Summary
static String base64Encode(byte[] bytes)
           
static byte[] createRandomBytes(int size)
           
static int createRandomNumber(int min, int max)
           
static String getAcceptKey(String key)
           
static String getKey()
           
static byte[] md5(byte[] bytes)
           
static byte[] sha1(byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGIC_GUID

public static final String MAGIC_GUID
See Also:
Constant Field Values
Constructor Detail

WebSocketUtil

public WebSocketUtil()
Method Detail

getKey

public static String getKey()

getAcceptKey

public static String getAcceptKey(String key)
                           throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

md5

public static byte[] md5(byte[] bytes)

sha1

public static byte[] sha1(byte[] bytes)

base64Encode

public static String base64Encode(byte[] bytes)

createRandomBytes

public static byte[] createRandomBytes(int size)

createRandomNumber

public static int createRandomNumber(int min,
                                     int max)


Copyright © 2014. All Rights Reserved.