Code example for GeneralSecurityException

Methods: printStackTrace

0
									 JSONException { 
	try { 
	return commonInit(qUrl, ctx, false);
	} 
	catch(GeneralSecurityException e) {
	    e.printStackTrace();
	} 
	return null; 
    } 
 
    public static byte[] copyArray(byte[] in, int len) {
	    byte[] ret = new byte[len];
	    // pad with 0 first 
	    for ( int i = 0; i < ret.length; i++ )
		ret[i] = 0;
	    for( int i = 0; i < in.length && i < len; i++ ) {
		ret[i] = in[i];
	    } 
	    return ret;
 
    }