org.chaostocosmos.chaosgraph.Enc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chaosgraph Show documentation
Show all versions of chaosgraph Show documentation
This library contributes to making charts on AWT/Swing/SWT components. It can be used for AWT/Swing applications and Eclipse SWT (Standard Widget Toolkit) applications. If you would try to build a service of RAP dashboard web application, this library will provide great UX experience and excellent interactive functionality to the service for users.
The newest version!
/**
* Chaos Graph API
*/
package org.chaostocosmos.chaosgraph;
import java.io.UnsupportedEncodingException;
/**
* Title: Enc class
* Description:
* Charset encoding utility
*
* Copyright: Copyleft (c) 2006
* Company: ChaosToCosmos
* @author 9ins
* @version 1.0, 2001/8/13 19:30 First draft
* @version 1.2, 2006/7/5
* @since JDK1.4.1
*/
public class Enc
{
/**
* Get 8859_1 text from euc-kr text
* @param ko
* @return
* @since JDK1.4.1
*/
public static String get8859_1(String ko) throws UnsupportedEncodingException {
if (ko == null) {
return null;
}
return new String(ko.getBytes("EUC_KR"),"8859_1");
}
/**
* Get euc-kr text from 8859_1 text
* @param en
* @return
* @throws UnsupportedEncodingException
*/
public static String getEUC_KR(String en) throws UnsupportedEncodingException {
if (en == null) {
return null;
}
return new String (en.getBytes("8859_1"), "EUC_KR");
}
}