deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.framework.util
Class CharsetUtils

java.lang.Object
  extended by org.deegree.framework.util.CharsetUtils

public final class CharsetUtils
extends Object

Since:
2.0
Version:
$Revision: 18195 $, 1.0. $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Method Summary
static String convertFromUnicode(String input, String targetCharset)
          A method to convert an input string in UTF-8 to a given charset by using CharsetDecoder
static String convertToUnicode(String input, String inCharset)
          A method to convert an input string from a given charset to UTF-8 by using CharsetEncoder
static String getSystemCharset()
          returns the name of the charset that is passed to the JVM as system property -DCHARSET=...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSystemCharset

public static String getSystemCharset()
returns the name of the charset that is passed to the JVM as system property -DCHARSET=... If no charset has been defined UTF-8 will be returned as default.

Returns:
the name of the charset that is passed to the JVM as system property -DCHARSET=... If no charset has been defined UTF-8 will be returned as default.

convertToUnicode

public static String convertToUnicode(String input,
                                      String inCharset)
A method to convert an input string from a given charset to UTF-8 by using CharsetEncoder

Parameters:
input -
inCharset -
Returns:
the charset encoded String

convertFromUnicode

public static String convertFromUnicode(String input,
                                        String targetCharset)
A method to convert an input string in UTF-8 to a given charset by using CharsetDecoder

Parameters:
input -
targetCharset -
Returns:
the decoded string

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org