Code example for Charset

Methods: equals

0
 
		if (isEmptyString(url) || isEmptyString(message) || isEmptyString(appId) || isEmptyString(appVer) || isEmptyString(appName) || isEmptyString(encoding))
			throw new IllegalArgumentException();
 
		try { 
			if (KakaoLinkCharset.equals(Charset.forName(encoding)))
				message = new String(message.getBytes(encoding), KakaoLinkEncoding);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} 
 
		this.params = getBaseKakaoLinkUrl();
 
		appendParam("url", url);
		appendParam("msg", message);
		appendParam("apiver", KakaoLinkApiVersion);
		appendParam("appid", appId);
		appendParam("appver", appVer);
		appendParam("appname", appName);
		appendParam("type", "link");